PDA

View Full Version : I can't Run LaunchAppAndWait("setup.bat","", WAIT)<0 ) successful under WINDO



laozhuang
12-15-2003, 02:17 AM
I can't Run LaunchAppAndWait("setup.bat","", WAIT)<0 ) successful under WINDOWS XP System and Windows 2003. Why?

Installshield scripts list below:
function ExFn_DoInstall(hMSI)
STRING szvPath;
STRING szvPathFileName;
NUMBER iRet;
begin
// Launch the setup.bat.

szvPathFileName = AUTOBAT_PATH_FILENAME;
LongPathToQuote(szvPathFileName,TRUE);

szvPath = AUTOBAT_PATH;

//LongPathToQuote(szvPath,TRUE);

iRet = ChangeDirectory(WINDISK^"\\");
iRet = ChangeDirectory(szvPath);

//if (iRet) then
// MessageBox("WRONG!",SEVERE);
//endif;

if (LaunchAppAndWait("setup.bat","", WAIT)<0 ) then
MessageBox ("Unable to launch "+AUTOBAT_PATH_FILENAME+".", SEVERE);
endif;
end;