This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 06, 2008
08:54 AM
Launch .htm after install (basic msi)
I need to launch a .htm page that was installed with my project after the install is complete.
I used the project assistant to give the the user the option to launch the program after install. However, if I point it to my .htm file it doesn't launch.
How can I run this page after install?
Thanks.
I used the project assistant to give the the user the option to launch the program after install. However, if I point it to my .htm file it doesn't launch.
How can I run this page after install?
Thanks.
(12) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 06, 2008
01:37 PM
Alright I figured it out. This is what I did. I made a vbscript custom action (type 102). I assigned it to the button click event at the SetupCompleteSuccess action.
Here is my vbscript:
Anyone foresee any problems?
Here is my vbscript:
Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run "file:///C:/Program%20Files/GoFigure/Training%20and%20Documentation/index.htm"
Anyone foresee any problems?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 08, 2008
09:45 AM
How will you handle silent installations or isnt it a consideration?
Paul
Paul
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 08, 2008
09:55 AM
Something else to consider is that virus scanners often intercept VBScript code that launches processes or touches the target system, unlike, say, DLLs and InstallScript code. Please search these forums and the KB for more approaches to launching an HTML file at the end of the installation...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 08, 2008
10:36 AM
Ah, point taken. I will look into that. I was belief that I couldn't run installscript code on SetupCompletesSuccess since the installscript engine was no longer available?
So the only option other than the VBScript would be a call to a dll that kicks off the html page?
So the only option other than the VBScript would be a call to a dll that kicks off the html page?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 08, 2008
10:44 AM
I think that was an issue pre-InstallShield 12, when a big architecture change took place, but I believe you now can launch InstallScript code from SetupCompleteSuccess...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 11, 2008
01:30 PM
So I created an installscript custom action that I kick off from the SetupCompleteSuccess dialog. However I can't get it to work. I can see in the log where it started the custom action but none of my installscript code is executed. Any ideas?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 11, 2008
01:43 PM
What is the action code? The action properties? How are you launching it? Does an action with just a MessageBox call work?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 11, 2008
02:52 PM
So this is what I did:
Custom Actions -> InstallScript Custom Action.
Says MSI Type 65600.
Synchronous (Ignore Exit Code)
Immediate Execution
It is not scheduled in a sequence. In the SetupCompleteSuccess dialog behavior for the OK button there is a DoAction with the name of my custom action as the Argument. Condition is based on LAUNCHPROGRAM which I set to 1 and confirmed with the verbose logging.
If I put a messagebox at the start of the script the messagebox will show. I can see in the logs that the CA is started and ends with a return value of 1.
ideas?
Custom Actions -> InstallScript Custom Action.
Says MSI Type 65600.
Synchronous (Ignore Exit Code)
Immediate Execution
It is not scheduled in a sequence. In the SetupCompleteSuccess dialog behavior for the OK button there is a DoAction with the name of my custom action as the Argument. Condition is based on LAUNCHPROGRAM which I set to 1 and confirmed with the verbose logging.
If I put a messagebox at the start of the script the messagebox will show. I can see in the logs that the CA is started and ends with a return value of 1.
ideas?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 11, 2008
03:40 PM
So it's just that the HTML page isn't being launched? What does that code look like? Does launching any executable work?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 11, 2008
03:41 PM
You can use a "Launch an executable" custom action with Location set to Stored in the Directory table. Create a DoAction event in a dialog for UI installs and insert it in the execution sequence for silent installs. This is how I do it, and it works like a champ.
Working Directory:
Filename & Command line: "[SystemFolder]cmd.exe" /C start
Return Processing: Asynchronous (No wait for completion)
In-Script Execution: Immediate Execution
Execution Scheduling: Always execute.
The MSI type number should be 226.
-loralynne
Working Directory:
Filename & Command line: "[SystemFolder]cmd.exe" /C start
Return Processing: Asynchronous (No wait for completion)
In-Script Execution: Immediate Execution
Execution Scheduling: Always execute.
The MSI type number should be 226.
-loralynne
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 11, 2008
03:51 PM
For a quick InstallScript test, this seems to work; same action settings except for using Asynch + wait for exit code:
export prototype CallMeFromSetupCompleteSuccess(HWND);
function CallMeFromSetupCompleteSuccess(hInstall)
begin
// TO DO: get rid of hard-coded file path
LaunchApplication(
"C:\\Sources\\HtmlPanel\\sample.html", "",
"", SW_NORMAL, 0,
LAAW_OPTION_USE_SHELLEXECUTE | LAAW_OPTION_NOWAIT);
return ERROR_SUCCESS;
end;
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 11, 2008
04:40 PM
Thanks, that worked perfectly. The only thing I was doing differently was I was setting it to Synchronous and ignoring the exit code. Changing it to Asynch + waiting for the exit code works nicely. Thanks again.