Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > How to disable auto-reinstall feature
 

How to disable auto-reinstall feature

Hello all,

I have a Windows Forms project that is configurable via configuration files. I also have a setup project that installs the Windows Forms application and a set of "standard" configuration files. The problem is that, after installing, if I remove one of the configuration files then when I try to run the application it will try to reinstall the missing file automatically.

Is there a property to the file that can be set in the setup project that can help me get around this behavior?

Thanks,
-fakepoo
fakepoo  Monday, September 28, 2009 8:59 PM
I have done some more research and it appears that this is the behavior of an "advertised shortcut". This means that the shortcut on the desktop will check for missing files/components before running the program.

Any idea how to disable this?

Thanks,
-fakepoo
fakepoo  Monday, September 28, 2009 9:22 PM
After googling a bit more, it looks as though Visual Studio does not give access to this property. It appears that you must somehow set DISABLEADVTSHORTCUTS=1 within the MSI table.
fakepoo  Monday, September 28, 2009 9:47 PM
Hi fakepoo,

You can use WiRunSql.vbs in the Windows Installer SDK to add DISABLEADVTSHORTCUTS property value. Here is a way provided by Phil Wilson.
http://www.dotnetmonster.com/Uwe/Forum.aspx/vs-net-setup/921/Set-DISABLEADVTSHORTCUTS-property-in-VS-NET-setup-project

If you have anything unclear, please feel free to tell me.

Sincerely,
Kira Qian
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework!
Kira Qian  Thursday, October 01, 2009 7:11 AM

You can use google to search for other answers

Custom Search

More Threads

• .NET Framework 2.0 Installation - Long Time
• Creating Microsoft Windows Installer (.msi) file from VS2005 project
• deploying with user id / unique identifier
• c# windows forms Network Based Deployment
• WebBrowser Control
• Can not turn off automatic updates
• Problem creating Release Application .exe file!
• convert c# project to an application project
• problem isolating COM interfaces
• Devcon in custom action