Search code examples
c#visual-studiovisual-studio-2008setup-project

Force remove the user.config during uninstall?


how do i code the custom action during the uninstall? Would it require a batch file?

thanks!


Solution

  • The user.config data gets stored in the %APPDATA%\ProjectName folder.

    If you want to remove the user.config data when you uninstall then you can just use the System.IO.Directory.Delete("%APPDATA%\ProjectName");

    Note: You can get the installed path using the following Context.Parameters["assemblypath"] this is the path that the user selects to install the project.