index > ClickOnce and Setup & Deployment Projects > Run application after installation.

Run application after installation.

Hi all.

How I can run my application after press Exit button in installation wizard ?

I`ve made

  1. Install class with overriding OnCommited method,
  2. custom action in setup project with CustomActionData = "/path="[TARGETDIR]\" /runAdmin=[RUNADMIN]" (in custom action -> commit folder),
  3. additional wizard's dialog with one checkbox (CheckBox1Property = "RUNADMIN")

If checkbox is checked my application starts fine BUT (!) before pressing Exit button in installation wizard (after last dialog window appears).

What I should do to run my app after wizard's closing/exiting ?

Sorry for my english...

Eugene Ostroukhov

Hi,

I have been trying to do it for ages, the tool only has the commit action as the last event and I couldn't register anything after that. I have even tried to use the installer class of the application and overriding the Dispose to launch the applicaiton but it was useless, the commit event launches the installer class and when it finishes it disposes it, but the installer is still running.

I felt quite frustated until I use the Windows Installer SDK and I have said goodbye to the VS Setup tool. You have all the flexibility that you need event rebooting events and what is great, you can control what to do after rebooting :)

Other easier option (but you have to pay) is jumping to InstallShield (excellent product) but a little expensive.

Check the SDK and let me know if you have any question.

Best regards




Salvador Patuel - MCAD
SalvaPatuel

Thank you.

But i have no time to learn WinInstaller SDK right now :( .

And I've made setup project without any actions except defaults for now...

Eugene Ostroukhov
There are no features in Visual Studio to tie a custom action to the Exit button. You should just make it an Install custom action (because Commit custom actions are not always called) and you should code it to fire off your app asynchronously. If you just run it the install waits for your app to finish, so just write custom code that fires it off and doesn't wait for it.


Phil Wilson [MVP Windows Installer]
PhilWilson

I run my application as separate process. ( Process.Start(somepath) )

Does Install will waits for finishing this process?

 

But anyway I still need to finish install app when I starting main app.

Eugene Ostroukhov
I think Process.Start is asynchronous, so you're ok. If your custom action just pointed at your exe and ran it, Windows Installer would pause the installation until it finished.


Phil Wilson [MVP Windows Installer]
PhilWilson

Ok.

Thank you all!

Eugene Ostroukhov
reply 7

You can use google to search for other answers

 

More Articles

• Error message "Unable to locate .msi application file
• Clickonce and MSBuild
• while Installing Register a component
• Help! How can I make it check for updates? (MSI, non ClickOnce)
• How to run the exe file without UI made by InstallShield?
• Problem deploying ClickOnce app
• Can VSTO project publish by ClickOnce ?
• install desktop icon conditionlly
• Schemas for .application and .manifest files?
• Register an ODBC System Data Source at setup?
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• dll needs to go into gac?
• Can we run Custom exe while ClickOnce de
• Error: Unable to activate the application
• assign socket permission to ntd winform
• version management in deployment server
• Update an application
• I can't rename a file in my language(Gre
• Pass arguments thru events.
• Some files are not published by VS.NET 2
• Error when publish
• error when client using clickonce install
• 3rd party software as prerequisite, NGen
• Click Once with two project !!!
• Related File type in Setup project
• How to register custom file type

Hot Articles

• How to atop download project which inclu
• Deploy ClickOnce application using MSBuild
• troubleshooting AppUpdater
• Must reinstall ClickOnce application eac
• COM server not registered
• Form focus problems
• Accessing the DOM object.
• .EXE.CONFIG for an IIS deployed EXE
• How to enable "Auto Repair" fo
• Application Updater Component / Apache
• Help for final application
• ClickOnce Question
• How to Create Subfolder inside Data fold
• cruisecontrol, msbuild, obfuscate, click
• ClickOnce and Team Foundation

Recommend Articles

• Request for permission granted by target
• Launching Conditions
• Why IIS is needed to host controls in IE ?
• Newbie with uninstall and update questions
• Running my application as a limited user
• Install dialog shows the Cancel button c
• serial number
• How to uninstall a ClickOnce application
• User who does not have folder redirectio
• Last Event to Fire in Install?
• Setup project & Shortcut to startup
• VS2003 setup proj-how to make entry in r
• COM depoyment in ClickOnce
• error when client using clickonce install
• How to check for updates programmatically