Add an option to either remove or keep installed files on uninstall?
I'm using the Visual Studio Setup Project to create my installer.
How can I give the user an option to either keep or remove files and/or a folder when uninstalling? The install includes a database and the may w开发者_StackOverflowant to keep this on disk and associated content in case they re-install or upgrade.
you could add a custom uninstaller System.Configuration.Install.Installer that will ask for the choice and then removes the files depending on the result or even better add a wizard page with a radio button to ask for the decicion and pass the selected button value to your install helper as arguments. See InstallHelper samples how you can pass these option values to your own helper class.
精彩评论