Deinstalling application data. Which path to use in uninstaller? - deployment

I am creating an installer using nsis. The application downloads a huge amount of user data. What is the best way to remove this data in uninstaller?
Set the application data path in
installer (using
environment/registry, config file
etc) and use it in application?
Use fixed path in both installer and application.
Something else ...?
How do you solve this?

I use the application data path from Windows ("$APPDATA\Application Name") for the data when installing/uninstalling, then delete the directory when uninstalling.

Related

macOS. Replace application in Shared folder with admin priveleges

Our app is being stored in /Users/Shared/OurAppData/OurApp.app.
One of the reasons for this is to enforce user to use launcher.
But, now we've met the problem, when we want to update our app through the launcher(we download zip file, extract that and that wants to replace our app with the new one with)
try FileManager.default.replaceItemAt(URL(fileURLWithPath : Paths.ourAppPath) , withItemAt: extractedURL)
"You don’t have permission to save the file “OurApp” in the folder “ OurApp Data”."
My question is - is there a way to handle that situation?
I guess the best solution to promt user for login and password for permissions, and to replace that file? I guess this is something outside the Swift scope, and probably AppleScript, or even .sh.
Please, help.
Thanks
I recommend to have a look at the Sparkle framework for updating applications.
Sparkle handles the checking if an update is available, downloading the update, asking for an administrator password if required, and cleaning up the downloaded files after the update.
For most application it is enough to just have the new version archived as zip archive.
But it is also possible to update application with helper applications or agents which are outside of the main application bundle.
This can be done with installer package *.pkg. If you are familiar with Sparkle, the "Automatic installation" referred here will only show the Sparkle UI. In the background it will use macOS’s built-in command line installer, /usr/sbin/installer.
In most cases it will make sense to have the same .pkg as user facing installer and update, it is not required.
If your application is sandbox, there are a couple of forks of the framework.

How to read and write text files from appengine?

I am using eclipse Luna. I want to read and write text files from my appengine and the path of those files I will set on run time from the local host, like "C:\Users\Public\Documents\newfile.txt" . Anyone give me a good code or link or a direction how to resolve this.
You cannot write to file system in AppEngine but you can use CloudStorage https://cloud.google.com/appengine/docs/standard/java/googlecloudstorageclient/read-write-to-cloud-storage. Duplicate of Does Google App Engine allow creation of files and folders on the server?

Deploy files in the localState folder during installation of a store app

I am building an app for windows store and I need some default and example data to be in the localstate folder (Windows.Storage.ApplicationData.current.localFolder) when the app run the first time.
The folder and files structure is a bit complex and I tryed to copy the files at the start of the application, but I can't manage that way.
Is it possible to have files being copied automatically from the installation folder to the localstate folder during the store app installation?
Unfortunately, customization of the app install process isn't currently supported. You have to do this as part of your first run processing.
One possibility is that you include the data in your package as a .ZIP or other compressed file and use an appropriate library to expand that file into a folder structure on startup. That could simplify your logic considerably. (I don't have a library to recommend; it's just an idea.)

Deploy Click once as a single file?

I am looking to use click once to deploy an application for internal use, When publishing to the network share it creates several files and folders. (manifest, ApplicationFiles etc)
Is there a way to bundle this up as a single file, I do not fancy the idea of allowing other users access to the application Files folder that is created, I would rather just give them the exe and have it take care of everything else.
Does anyone have experience with this, or am I stuck with the application Folder, Application Manifest, and setup file all being in the same directory for installation.
There is not a way to package the whole application folder and files into one file, like an MSI with ClickOnce.
You could code something on your own to have a shell app that use ClickOnce and its only file would be your app compressed. The shell would download that compressed file to the client's machine and would unzip etc.
You could also InstallShield Limited Edition that comes with VS 2012/2013 in the Other Projects, Setup and Deployment but that does give you the ClickOnce easy of deployment features. You could use the InstallShield setup to be your compress file in your shell clickonce app and then just use Process.Start to launch the InstallShield setup. It should work.

Deployment of About.htm with ClickOnce

I have a Win app (VB.net 2005) with an About.htm page that comes up when the user presses F1, using a HelpProvider control.
The application was deployed using ClickOnce technology. When I release a new version I have to manually copy the About.htm file from my development area to our LAN (specified by the HelpNamespace property of the HelpProvider control).
Is there a way I can include this as part of the deployment?
Thank you.
Add the file to your project and set the build action to 'content' and 'copy to output directory' to 'copy always'. Then the file will be included in the deployment when you build and deploy.
To locate it programmatically, assuming you're using winforms (because you're using vs2005), you can find it by looking for it at System.Windows.Forms.Application.StartupPath.
You can open it by doing a Process.Start("iexplore.exe", myHtmlFile). You could also make a form and show the about file in a web browser control pointing to the file as a URI.
RobinDotNet
I think the best way is to make your Help-File a part of the Application. Take a look at this question. With this way the Help-File will be downloaded with your Click-Once application.