McGeeky

Hi,

I am creating a windows installer using Visual Studio 2003. When I run the setup.exe again after installation the user has the option to repair the installation; if they choose it the installation gets run all over again. This could be fatal. Our installation process could corrupt the database if it gets run more than once. Is there a way to disable the repair feature Or, is there a way for our custom actions to know that installation is being run a second time so that they can ignore it

Thanks.

McGeeky



Re: ClickOnce and Setup & Deployment Projects Disable repair option

PhilWilson

Put a condition of Not Installed on your custom action. Installed is a case-sensitive property that is set if the product is already installed. During a repair the product is installed, so a Not Installed condition means that it will run only on a first-time install.

You may need to worry about upgrade using RemoveExistingProducts because that's an uninstall followed by an install of the new product, and if your first setup included and installed the database and it's been updated you probably don't want it uninstalled.






Re: ClickOnce and Setup & Deployment Projects Disable repair option

McGeeky

Hi Phil. Thanks for that great tip!