all groups > visual studio .net setup > may 2004 >
You're in the

visual studio .net setup

group:

Launch application automatically after install?


Launch application automatically after install? TJ
5/19/2004 8:46:03 PM
visual studio .net setup:
Dear Sir/Madam

I just want to set something that application can be launched automatically after install is completed
I created Installer Project in Install and Deploy project, and put my application file that I want to launch in the project
However, I coudn't find any menu option that I can set something for launching the application file automatically after installation

Is there any way that I can do thin one

Thanks

...................................................................................................T
Re: Launch application automatically after install? Phil Wilson
5/20/2004 8:18:21 AM
An install custom action is what you need, except that the ones generated by
VS are synchronous (the install won't finish until the program finishes).
You could have a custom action that launches your program asynchronously, a
VBScript custom action that does a WSHShell Run can do that.
--
Phil Wilson
[MVP Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

[quoted text, click to view]
.............................................................................
.......................TJ
[quoted text, click to view]

Re: Launch application automatically after install? TJ
5/20/2004 12:16:02 PM
Hi, Phi

Thanks for your responding
I understand I can do it by an install custom action, however, VS.NET IDE seems like..
not allowing me to write some action code in the Install & Deploy project.
To write some custom action code, which menu should I click to open some editor?.

Thanks

.........................................................................T
Re: Launch application automatically after install? joe_goeke NO[at]SPAM hotmail.com
5/20/2004 4:14:42 PM
I had the exact same problem. I created a VB exe that does a "launch
and not wait" such that once the launched app is started, the VB exe
continues and exits which allows setup to finish and exit while your
app is still running.

Let me know if you want the code an I'll email it to ya.

---JHG

[quoted text, click to view]
Re: Launch application automatically after install? Phil Wilson
5/20/2004 7:58:41 PM
That's right, you have to write code in some other project and point to the
exe (or DLL) wen you add the custom action. If you're into C++ a lot of
folks use a standard C++ DLL to contain all their custom actions. Joe's got
the right idea in that other post.
--
Phil Wilson
[MVP Windows Installer]
[quoted text, click to view]

Re: Launch application automatically after install? enewman NO[at]SPAM online.microsoft.com
5/21/2004 7:35:54 PM

Here are some detailed steps for lauching your app after installation:

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.

Hope this helps,
Elizabeth

--------------------
[quoted text, click to view]

----
Elizabeth Newman – Visual Basic Deployment Test Team
This posting is provided "AS IS" with no warranties, and confers no rights.

Re: Launch application automatically after install? TJ
5/22/2004 5:56:03 PM
Thanks for your reply

Where is "Custom Actions Edtior"
I tried to find it, but I coudn't.
The only context menu that I coud see is that something like "Add special folder.".
Can Custom Action Editor only be used in VS.NET 2003??
FYI, I am using VS.NET 2002

Thanks

.......................................................................................T
Re: Launch application automatically after install? Phil Wilson
5/22/2004 6:16:08 PM
Select the project in Solution Explorer, then View, Editor, Custom Actions.
--
Phil Wilson
[MVP Windows Installer]
[quoted text, click to view]
.............................................................................
...........TJ
[quoted text, click to view]

Re: Launch application automatically after install? TJ
5/22/2004 7:41:02 PM
OOOOPPPSSS...:-

Thanks

Re: Launch application automatically after install? TJ
5/22/2004 9:06:08 PM
Hi

It seems like that here is my last question
Like Elizebeth mentioned, I exactly did same thing...
However, runtime exception error was invoked....

When I debugged it, it indicated this line "WshShell.Run cmd,1,True

Here is my vbs that I used for custom action commi

cmd = Session.Property("CustomActionData"
Set WshShell = CreateObject("WScript.Shell"
WshShell.Run cmd,1,Tru
'Set WshShell = Nothin

When I looked at the value of cmd, it was correct path for executable file that I wanted to run after installation
Of course, Window Scripting Host is installed in my computer

Why this vbs generated exception error?

Thanks

..........................................................................T

Re: Launch application automatically after install? Hiram G.
5/24/2004 10:34:59 AM
Hello... I have the same question but for VS 6.0. Are these instructions
only for .NET or do you know of a way to do it in vs6? I could not find
that Custom Actions editor...

Thank You,
Hiram G.
__________________________________

[quoted text, click to view]
.............................................................................
.......................TJ
[quoted text, click to view]

Re: Launch application automatically after install? Phil Wilson
5/24/2004 12:33:30 PM
I'm wondering if you have path names that need quotes around them.
--
Phil Wilson [MVP Windows Installer]
----
[quoted text, click to view]

AddThis Social Bookmark Button