I have created a console installer which does the following things
Downloads zip files from server and extracts it on user system
Copies a folder from the extracted files in maya install directory after searching for its install path from registry
Adds registry entry for another exe file my application is using
Downloads and places that exe from server on user system
Its working perfectly fine but its not user friendly as the user keeps looking at console while app downloads and extracts data on his system.
I looked and found few auto setup installers.
Is clickonce use able for my scenario or should i go for some other or should i create my own gui for the app and add progress bar.
P.S: I am using c#, .net framework 4.5
Related
Goal:
I am trying to make a setup file for my app. Futhermore the app must be able to be updated from a server or OneDrive.
Solution:
I am using windows application packaging project for this.
The issue:
The installer works fine when the installer location is on my local harddrive. But when i try to change the installer location to my online file manager or a public OneDrive folder I am unable to download and install the update or App for that matter.
My question:
Has anyone been able to use windows application packaging project where the app downloads updates from a server / OneDrive by uploading the installation file to a server / OneDrive and entering the path to the location, or am I on the wrong track?
Alternatives
The alternativ is of course to use Setup Project and perhaps AutoUpdaterDotNET (from NuGet) which works fine, but now I am interested in a solution which does not require several different third-party programs, and windows application packaging project seems to be the solution.
Have you tried creating an .appinstaller file? This XML file (which you can write in any code editor - you don't need VS or Advanced Installer to generate it, although that way is easier) should allow the OS to cache all the necessary information to auto-update the app accordingly.
I'm fairly new to windows forms and I was recently tasked with creating a simple software which will be deployed by USB drives to other companies. I made this software so during first run I check for a config.xml file. If it doesn't exist, I will send the user to a form to configure their first time setup. Next time I run the program, it skips this step since the config.xml file is found with its values. The problem is when I debugged this, I found the config.xml file alongside the executable, however when I ran this on a different computer, it stored it into the appdata virtual store. I read up on this and found out it has to do with write permissions.
Is there any way I can get around this without prompting the user to do anything extra on their part such as run as administrator? I also plan on saving the resulting reports generated by the use of this program and was hoping I can have XML files which can be easily found within the application folder.
*Note, I am aware of the built-in settings system but this also stores into appdata and if the executable is moved to another directly, it loses sight of that config and wants to create another.
EDIT : Please be aware I am trying to AVOID writing to the AppData folder. The software is packaged with Visual Studio Installer - Setup Project. A msi file is created which stores the application in C:\Program Files (x86)\\. Inside this directory I have the executable, the exe.config file which is generated, and any DLLs needed. This is the folder I am trying to also store the config.xml file but due to some windows magic, the code thinks its storing it here but in reality it is being stored in the virtualStore folder located in AppData.
Have you thought of using the C:\ most computers have this unlocked. alternitively use Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
the AppData folder is stored in the username space and requires no permission. (just remember to create a folder for your program to avoid conflicts)
It is a known issue due to security concerns that write permissions are limited.
More can be learned here.
Since no one was able to answer this, I will post my solution. Instead of packaging the solution using Visual Studio Installer tools. I install the application by copying the resulting executable from the build. This version of the application has write permissions that would have not existed if the application was installed using the resulting .msi from the Installer tools.
I have a problem with the deployment of my app:
I created the app in C# (Windows Forms) on Windows 7, tested it, working just fine. I moved the .exe and dlls to another computer with Windows 10, tested, working just fine. All good with the app until now.
The next step is to create a setup file for it. I managed to create the setup file, it installs my app, the app work but can't create files (log files for example - files are stored next to .exe file). I found out that the folder needs full control permissions for Users. How can I set the permissions to the folder when the app is installing?
I found a solution, not as elegant as I wanted but it works: on commit, the setup will execute a .bat file with a script that will give full permissions for IIS_IUSER.
Check this link:
How to run a ".bat" file during installation?
Hi i would like to know if i can write code into a File.Create(Directory.GetCurrentDirectory() + "/Name.exe") that is in c#.
My purpose for this is I need 2 applications, one is a launcher and one is a updater, i originaly had a File.Exist looking for the updater so no errors occured, but i would like it so you only need the launcher at first then it adds the other folders and files when you first open it.
Instead of reinventing the wheel try using ClickOnce
If you're going to need a certificate if your app is to be signed and publicly distributed. You can work with a test certificate for development
Build your app, right-click on the main project and pick Publish (also on the Build menu), follow the wizard
The target location you pick will end up having an app.application file and some folders, one for each version you publish. You can put these files on a file server somewhere and share the link to the .application file with your users. Every time you publish their app will get updated the next time they use it.
If reinventing the wheel is your thing you can build your app, make another project checks a link for a file that contains a version, compares with the local version and downloads if newer, then launches the downloaded exe.... just like clickonce
Mine is an MVC web application which keeps different utilities on file server, we provide links to download them. As I was suggested, I want to create some installer so that end user will see our UI while downloading the app.
I want my installer to do
- Download the application exe file from the file server (I will provide a link for that)
- Run the app exe so that user can install the application.
I have many application files (5000+) I want to create a single installer which will call its related application itself (some data will be passed)
NOTE : WPF is not necessary I can create a normal window application too.
Thanks in advance.