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
- :
- InstallScript working from local hard disk, but not from CD
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jul 09, 2008
03:32 AM
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?
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?
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jul 09, 2008
04:46 AM
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!
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!