Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Do not auto run application after installation?
 

Do not auto run application after installation?

I used Click-Once to publish project. Once I double clicked .exe file and finished installation, every time the application will automatically start. Is there anyway I can prevent this. I checked out Click-Once settings and found nothing about this.
MikeDai  Tuesday, June 23, 2009 7:02 AM
No, there is no way to configure this in ClickOnce.

If you're feeling brave, you could check ApplicationDeployment.IsFirstRun and if it's true, just exit the application. This is only set to true when the user gets an update or installs the application. I wouldn't do it, but it's an option.

Why do you want to do this?

RobinDotNet
Click here to visit my ClickOnce blog!
RobinDotNet  Wednesday, June 24, 2009 4:54 AM
No, there is no way to configure this in ClickOnce.

If you're feeling brave, you could check ApplicationDeployment.IsFirstRun and if it's true, just exit the application. This is only set to true when the user gets an update or installs the application. I wouldn't do it, but it's an option.

Why do you want to do this?

RobinDotNet
Click here to visit my ClickOnce blog!
RobinDotNet  Wednesday, June 24, 2009 4:54 AM
Thank you, Robin. Now you confirmed my thought. I will not worry about this too much. May be I should use other publish package rather than Click-Once.
MikeDai  Thursday, June 25, 2009 3:34 AM

Hi MikeDai,

You can create a Setup Project to build installation package. You can get more information from
http://msdn.microsoft.com/en-us/library/206sadcd.aspx.

Best regards,
Aland Li


Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
Aland Li  Thursday, June 25, 2009 5:36 AM

You can use google to search for other answers

Custom Search

More Threads

• Can NOT get VB9 Project to delpoy completely with MS SQL 2005 form Devoloper to Customer site.
• Error Code: 0x80070643
• Setup & Deployment - Optional 'Add file type'
• how to add Uninstall link in startup menu
• What happened to the beta 2 Profile menu in the Settings project property page?
• VB 2008 Setup Project Not Working Correctly (Framework 3.5 SP1)
• Manually change where client looks for updates ?
• Unistall icon on the program menu!
• "Unable to activate the application. Please contact the application publisher."
• Publish C++/CLI project