cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Arshbeer_Singh
Level 5

Launch a webpage after instalation completion

I need to launch the homepage of the web application I have installed once the installation is complete. What is the way to accomplish this??
Thanks in Advance!
Labels (1)
0 Kudos
(1) Reply
Evan_Border
Level 8

Arshbeer Singh wrote:
I need to launch the homepage of the web application I have installed once the installation is complete. What is the way to accomplish this??
Thanks in Advance!


You can use an InstallScript custom action to launch the web page. The screenshot below shows the custom action code. It is grabbing the value of the Windows Installer INSTALLDIR property (this custom action is scheduled to run at the end of the user interface, so it has access to the value of INSTALLDIR). It then takes INSTALLDIR and combines it with the name of the .htm file, storing the new value in the strWebPage variable. Finally, it uses the LaunchApplication function along with the ShellExecute option in order to open the web page using the default web browser. I recommend having it call the custom action at the end of the install (have it trigger when the user clicks the Finish button at the end of the install).



The full InstallScript source code is:

#include "ifx.h"

export prototype LaunchWebPage(HWND);

function LaunchWebPage(hMSI)
NUMBER nBufferSize;
STRING strINSTALLDIR, strWebPage;
begin
MsiGetProperty(hMSI, "INSTALLDIR", strINSTALLDIR, nBufferSize);
strWebPage = ( strINSTALLDIR + "MainPage.htm");
LaunchApplication( strWebPage, "", strINSTALLDIR, SW_NORMAL, 0, LAAW_OPTION_USE_SHELLEXECUTE);
end;
0 Kudos