views:

38

answers:

2

Folks, I am creating an installer project in Visual Studio. This is done using a project of type "Setup and Deployment".

I lay out the file structure of my final install in the "File System" View of the project.

Now, some of the files I create as part of my install are updated while my application is used. I would like these files to not be removed during an uninstall of my application. Is there any way in Visual Studio to designate a file as "protected from uninstall"?

Thanks for your help.

A: 

I'm not sure how to do it in the installer, but any file that you create from the application will be preserved in the event of an uninstall.

If you can stand it, maybe you could create these files as a first-time initialization in your application.

Of course, this can lead to other problems (permissions to create a file), but it might be easier than fighting with the cryptic installer setup.

Andy White
+1  A: 

In the Solution Explorer window, in the Setup project, click the file. Then in the Properties window, set the Permanent property to True.

Windows programmer