开发者

Installshield : How to preserve files after uninstallation

I am using installshield 11 to create Basic MSI Project. My requirment is, when i unstall the project, i want to preserve certain files.( I don't want these开发者_如何学Python Certain files to be removed when unstallation takes place ). Morover, these files are not a part of the component, but they are created(copied) during installation process by using copyfile (script) command from specific location.

-Dev


Use Disable(LOGGING)....Enable(LOGGING). Using CopyFile() in-between these methods will prevent uninstall removing the files


Windows installer removes only those files and folders which it installs. That is each file present in it's database in File table and Folder table. It do not remove any file which does not have entry in File table, similar for folder.

Also, If folder is not empty then that folder does not get deleted during uninstall.

If your installing some files using Copyfile script ( may be using any custom action) then those files will not be removed during uninstall.


Thanks Balachandra for your response, But i have below observation which might help.

Files which i want to preserve is created by CopyFile, and target dir which i mention in the copyfile command does not exist. So CopyFile creates the folder and copy the file to that folder. So obviosly we will not have this folder entry in the dir table of installsheild

But this approach does not help, uninstallation is removing all copied files from this folder. -Dev


Thanks, Alerter, I've been fighting this one for 2 days.

We install an example configuration file and create a copy of it (on first installation). We needed to preserve the configuration file if the customer changed it, but the file was always getting deleted on uninstall. Disabling the LOGGING around the CopyFile command was exactly the solution for this situation.

Dev, I know this is an old post, but you should accept this as the correct answer.

Hopefully this phrase will help others find this solution easier through the search engines: Installshield file created with CopyFile is always deleted during uninstall

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜