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.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Launch a webpage after instalation completion
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
May 25, 2015
11:14 PM
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!
Thanks in Advance!
(1) Reply
May 27, 2015
08:44 PM
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;