PDA

View Full Version : File.Run return code problem


kevin215
02-22-2008, 11:05 AM
i'm make a AutoPlay CD. and having the following code to run an installation. When a user click on the button, below is the script. The problem is that when I run the installation locally. The return code work. When I run on the CD, the return code doesn't work.

Window.Minimize(Application.GetWndHandle());
Install = File.Run("AutoPlay\\Data\\setup.exe", "", "", SW_SHOWNORMAL, true);
if ( Install == 0 ) then
Window.Restore(Application.GetWndHandle());
end;

Can anyone please help me figure out what is wrong? Thanks,

holtgrewe
02-22-2008, 12:59 PM
Try putting:

Install = File.Run(_SourceFolder.."\\AutoPlay\\Data\\setup.exe", "", "", SW_SHOWNORMAL, true);
and see if that works.

There are several of these Global Variables listed in the help file under Variables > Global variables

hth