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
- :
- Open "readme.html" file in SetupCompleteSuccess...
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Nov 07, 2010
04:46 PM
Open "readme.html" file in SetupCompleteSuccess...
Hi.
I'm making a Basic MSI Project, in "SetupCompleteSuccess" dialog i need to launch a readme.html file.
So how can i do to work this?, i found some code script to detect default browser and launc it.
[PHP]#include "ifx.h"
export prototype MyFunction(HWND);
prototype NUMBER Shell32.FindExecutableA(STRING, STRING, BYREF STRING);
prototype NUMBER Shell32.ShellExecuteA(HWND, STRING, STRING, STRING, STRING, INT);
function MyFunction(hMSI)
STRING Found;
INT nResult;
begin
if (UseDLL(WINSYSDIR ^ "shell32.dll") < 0) then
MessageBox ("Couldn't load Shell interface dll (shell32.dll)", SEVERE);
return;
endif;
// Find the application associated with the desired html file
nResult = FindExecutableA(INSTALLDIR + "\\readme.html", "", Found);
// If an application is found, launch it!
if (nResult > 32) then
ShellExecuteA(HWND_INSTALL, "open", Found, INSTALLDIR + "\\readme.html", "", SW_SHOWNORMAL);
else
MessageBox( "Can't launch browser", WARNING);
endif;
UnUseDLL("shell32.dll");
end;[/PHP]
Please any help?, thanks.
I'm making a Basic MSI Project, in "SetupCompleteSuccess" dialog i need to launch a readme.html file.
So how can i do to work this?, i found some code script to detect default browser and launc it.
[PHP]#include "ifx.h"
export prototype MyFunction(HWND);
prototype NUMBER Shell32.FindExecutableA(STRING, STRING, BYREF STRING);
prototype NUMBER Shell32.ShellExecuteA(HWND, STRING, STRING, STRING, STRING, INT);
function MyFunction(hMSI)
STRING Found;
INT nResult;
begin
if (UseDLL(WINSYSDIR ^ "shell32.dll") < 0) then
MessageBox ("Couldn't load Shell interface dll (shell32.dll)", SEVERE);
return;
endif;
// Find the application associated with the desired html file
nResult = FindExecutableA(INSTALLDIR + "\\readme.html", "", Found);
// If an application is found, launch it!
if (nResult > 32) then
ShellExecuteA(HWND_INSTALL, "open", Found, INSTALLDIR + "\\readme.html", "", SW_SHOWNORMAL);
else
MessageBox( "Can't launch browser", WARNING);
endif;
UnUseDLL("shell32.dll");
end;[/PHP]
Please any help?, thanks.
(3) Replies
‎Nov 10, 2010
04:16 AM
well i search for this, and found that shellexecute is the way to use. But in CA how can I put this?
Or there is another method to use shell?
Or there is another method to use shell?
‎Nov 10, 2010
11:03 AM
The LaunchApplication API in InstallScript supports a LAAW_OPTION_USE_SHELLEXECUTE flag at least since IS2008.
‎Nov 11, 2010
04:13 AM
thanks michael, I'll try it.