PDA

View Full Version : Question regarding File.Run


Nocturnal
06-05-2006, 04:49 PM
I am trying to have this auto installer ask to install several programs. The thing is, if someone decides to install one program but then cancels out of that particular file being run, I would like it for the next file in order to be ran if it's at all possible.

Right now I have a dialog box asking if they'd like to install x program, if they click yes, it will start the .exe, the thing is, if they cancel out of this program, the AMS program doesn't resort to going to the next file. I do have it set to WaitForReturn=true.

TJS
06-05-2006, 05:45 PM
Try these for troubleshooting:

1) Check the last error
2) Catch the return from the File.Run() action to see what you are getting back when the install is cancelled. If it is meaningful, you may be able to evaulate it to have your script continue.


g_InstallReturn = File.Run(str_YourFileName, str_Args, "", SW_SHOWNORMAL, true);
g_Error = Application.GetLastError();
if g_Error ~= 0 then
Dialog.Message("Error "..g_Error, _tblErrorMessages[g_Error]);
end
Dialog.Message("Install Return", g_InstallReturn);