// 校验版本号
cmd = TARGETDIR^"abc\\bin\\checkversion.bat";
nResult = LaunchAppAndWait(cmd, "", WAIT);
NumToStr ( svString, LAAW_PARAMETERS.nLaunchResult );
if (nResult<0) then
MessageBox ("Unable to launch "+ cmd, SEVERE);
else
if (LAAW_PARAMETERS.nLaunchResult=1) then
MessageBox ("Version verification fails, upgrade not allowed", SEVERE);
abort;
//else
//MessageBox (svString, SEVERE);
endif;
endif;
帮助文档查函数LaunchApplication的参数和返回值解释
the LAAW PARAMETERS system variable ’ s nlaunchResult membercontains urn code of the lunched appication。
然后在帮助文档中查结构体LAAW PARAMETERS nlaunchResult的值,即为批处理的返回码。