cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tcom36
Level 7

InstallScript working from local hard disk, but not from CD

I have an installScript project whose purpose is to call another setup_myapp.exe if the user has admin rights. This setup_myapp.exe is added into a subdirectory with all necessary files with the Support Files/Billboards.

What it does:

function OnBegin()
begin
if (SYSINFO.WINNT.bAdmin_Logged_On) then
if (LaunchApp("disk1/setup_myapp.exe", CMDLINE) < 0 then
MessageBox("Launch disk1/setup_myapp failed",SEVERE);
endif;
abort;
else
MessageBox("No admin rights", SEVERE);
endif;
abort;
end;

As long as the setup is on a device which appears under windows files explorer under "Hard Disk Drives", it works fine.

When the setup is on a device which appears under "Devices with Removable Storage", LaunchApp fails. (I can however start setup_myapp.exe by double clicking on it).

Does the relative path not work when on a removable device? Is there a way to make it work?
Labels (1)
0 Kudos
(1) Reply
tcom36
Level 7

SOLVED

The relative path seems not working on removable devices. Instead, I am building the absolute path

szSetup = SRCDIR ^ "disk1\\setup_myapp.exe";
...
if (LaunchApp(szSetup, CMDLINE) < 0) then
...

And it works!
0 Kudos