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

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.
Labels (1)
0 Kudos
3 Replies
thanatos83
Level 5

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?
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

The LaunchApplication API in InstallScript supports a LAAW_OPTION_USE_SHELLEXECUTE flag at least since IS2008.
0 Kudos
thanatos83
Level 5

thanks michael, I'll try it.
0 Kudos