tags:

views:

42

answers:

2

Hi All,

I have created a deployment file(msi) using VS Setup project. This msi file create a shortcut in desktop.During deployment I have added some predefined data files (.xml/text) into it.Application shortcut working fine i.e. it open the application and running fine.

But once I delete some data files from installation location, and then click application shortcut, it started installing the application and copied all those files into the original installation location again. My question is how to stop this re-installation after deletion of files.

Thanks, Pritam

+1  A: 

From this post:

Another common misconception is when attempting to disable self healing within a component, as self healing is triggered when Keypath are missing assumptions are made to delete the keypath to stop self healing. In actual fact if you wish to stop self healing on a single component the correct method is to remove the components component GUID from the component table. (this will be explained in more detail in the section on packed GUID's)

You can do specified manipulation using Orca (manually). Or you can use WiRunSQL.vbs (Win 7 SDK) script to do this automatically as PostBuildEvent command.

inazaruk
A: 

You are experiencing the "Repair" feature of Windows Installer.

This is being triggered because you're installing an Advertised shortcut.

If you dislike this behavior, do not specify the shortcut as Advertised.

This MSDN article on the Shortcut Table gives you some info on specifying Advertised vs. non-Advertised.

Sadly, Visual Studio does not have the same kind of customization capability as a real installer development environment like InstallShield or WiX, so what you're trying to do is tricky. More information here.

William Leara
Thanks for your post. it really helpfull and solved my problem.
Pritam Karmakar