Hi, I have a installation project, before installing my application, I need to install a VC redistribution. Sometimes the Shell.Execute returns 23, sometimes it returns 1638. I think only a return value of 0 means that it runs correctly. So I try to get the last error ,but the Application.GetLastError always return 0,Could you tell me how to find the means of the return value of the Shell.Execute.Or why the Shell.Execute does not return 0?
Announcement
Collapse
No announcement yet.
What is the meaning of the return value of shell execute
Collapse
X
-
result = Shell.Execute("Framework\\vc_redist.x64.exe", "open", szInstall, "", "SW_SHOWNORMAL", true);
lastError = Application.GetLastError();
Debug.Print("result: "..result.." last error "..lastError.." \r\n");
if ( lastError == 0 ) then
if ( result == 0 ) then
-- success
VCinstalled = true;
elseif ( result == 1602 ) then
-- cancel
elseif ( result == 1511 ) or ( result == 1641 ) or ( result == 3010 ) then
-- success restart
VCinstalled = true;
bReboot = true;
else
-- error
end
end
-
I wouldn't have been quite that generous, Ulrich - an RTM response might have been more fitting here. Look in your manual, ChrisChen. Directly linked from the Action Wizard under Shell.Execute:
... and ditto for the meaning of the Error Codes. Type 'error codes' into your manual's index:
Comment
Comment