Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > setup project, launch application upon installation
 

setup project, launch application upon installation

I've changed my C# project from click once to using a setup project, everything look good but I can't seem to find a clear answer on how to launch the app I just installed? I've research PostBuildevents, etc. I'm not sure what the syntax is for that? Or even if this is what I'd use. I don't think this should be hard, and should not require creating another project (I've seen info on custom action????). Help.
  • Moved byYiChun ChenMSFTMonday, August 10, 2009 10:30 AMDeployment issue (From:Visual Studio Setup and Installation)
  •  
chrislynn  Friday, August 07, 2009 4:37 PM
It'll be a custom action, yes, some code to run your program. If it's in the main Application folder you'll need to pass [TARGETDIR] via CustomActionData so your code can get the actual folder the user chose, then append your program name.

My recommendation is to not bother. Visual Studio will build your MSI to run your custom action (and therefore your app) with the SYSTEM account, so it might notbehave the way you expect. Let the user run it with a shortcut.
Phil Wilson
PhilWilson  Monday, August 10, 2009 11:47 PM
Hi Chrislynn,

I am moving this thread from Base "Visual Studio Setup and Installation" forum to the "ClickOnce and Setup & Deployment Projects" forum, since the issue is related to deployment. There are more deployment experts in the "ClickOnce and Setup & Deployment Projects" forum.

Thanks
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! If you have any feedback, please tell us.
YiChun Chen  Monday, August 10, 2009 10:30 AM
It'll be a custom action, yes, some code to run your program. If it's in the main Application folder you'll need to pass [TARGETDIR] via CustomActionData so your code can get the actual folder the user chose, then append your program name.

My recommendation is to not bother. Visual Studio will build your MSI to run your custom action (and therefore your app) with the SYSTEM account, so it might notbehave the way you expect. Let the user run it with a shortcut.
Phil Wilson
PhilWilson  Monday, August 10, 2009 11:47 PM
Thanx! I ended up creating an installer class and adding that to my set-up project as a custom action. And I did fin dthat this action must be in the install and commit folders!!!! to work. Thanx!
chrislynn  Tuesday, August 11, 2009 8:06 PM
Can you provide a link, I can not find this group (Click Once and setup.....) ???????? Thank you. And I'm not getting emails for replies to this????
chrislynn  Tuesday, August 11, 2009 8:10 PM
Hi chrislynn,

Please read Bruce' answer from:
http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/d8c1be8a-a431-4d0c-bdca-01dde8c94b2a.

He shows how to pass arguments to a custom action.

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  Wednesday, August 12, 2009 9:06 AM

You can use google to search for other answers

Custom Search

More Threads

• ClickOnce - after install the system, where is the source file?
• Couldn't load assembly after installing with ClickOnce
• Restore problems
• HELP!!!!!!!!! Problems with publishing
• Installing a ClickOnce published site
• Registry free COM
• ClickOnce Updates?
• Help with Clickonce and upgrade instance
• Error: This advertised application will not be installed because it might be unsafe.
• Install multiple instances of an msi on one box?