views:

32

answers:

1

I created a MSI installer by using Visual Studio 2008. I have some temp files that need to be deleted after the installation, but the auto-repair feature bothers me. The auto-repair feature will be triggered by clicking the shortcut created by the installer. I am thinking about creating my own shortcut to avoid that auto-repair. I tried this by manually creating a shortcut after the installation. It worked.

Now I am trying to find a way to create a shortcut in a custom action of the installer. My question is is there any possible negative effect to the installer and the installation result?

thanks

A: 

Even if you managed to intentionally circumvent Windows Installer, the files will still come back if the user hits the Repair button in Add/Remove programs. Instead you should be looking at ways to make the files temporarily available during the install without actually installing them. Sadly VDPROJ is so limited that it doesn't make this very easy to do.

However, if you want to ignore all that and just hack through the problem, take a look at running post build scripts against your MSI to make the shortcut non-Advertised.

Christopher Painter
Yes, that will be nice but I don't know how to write that script. thanks
5YrsLaterDBA
The "script" will depend very much on what you use for build automation. Here is one example using MSBuild:
Christopher Painter
@Chris you forgot the link?
5YrsLaterDBA
Wierd, I remember pasting it. http://blogs.msdn.com/b/mwade/archive/2007/08/20/select-play-select-3-0-select.aspx
Christopher Painter