Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Launch app after setup

Status
Not open for further replies.

Frihi

Programmer
Jun 24, 2001
48
0
0
CH
I'm using the install wizard to make a Setup for may vb.2003 app.

Is there a way to launch the installed app (or another programm) after setup has finished?

I cannot find any reference about this. But you see this in a lot of setups, they ask you at the end if you want to launch the app now.
 
Here a widely known technique:

1. Create a .vbs file with the following code.
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run """" & Property("CustomActionData") & """",7,False
Set WshShell = Nothing
2. Open your setup project and go to the Custom Actions Editor
3. Select the Commit Node and right-click, add a new Custom Action
4. Browse the filesystem to add the .vbs file from step 1
5. Edit the CustomActionData property and add the following:
[TARGETDIR]YourApp.exe
6. Change "YourApp.exe" to whatever your startup app file name is.

You can also write code to shell your setup.exe... except setup will not finish as long as your code has not exited. So... could you write a program that starts the code that shells setup, allow that code to exit while setup goes to finish, and your initial program is still running?...
 
Thanks very much Dimandja

Looks fine and I have tried it. The setup is stopped by norton, says that msiexec.exe has to be changed - sounds like Mr. Norton is very angry. If I let the script go on there comes an error message out of the app, looks like it can't load a dataset. And it also looks, like it is trying to start the app, bevor setup has finished.

To write a programm to shell the setup.exe, the problem also is, that it would need framework, which is only going to be installed along with the setup.

Fritz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top