View Full Version : Install File return codes
meercat
03-18-2009, 12:30 AM
Hello,
I am trying to determine if an install file command has executed and the file installed/replaced, based on the CRC upgrade check.
I see that the %_SB_ERRORCODE% return code is available, but I would like to determine if the file has been replaced, or installed (for the first time) or it failed and this seems only to return 0 or something else on failure or success. Of What?
How should I go about this?
Thanks
linder
03-18-2009, 12:53 AM
%_SB_ERRORCODE% will returns 0 if the file copied successfully. Otherwise, it returns -1.
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
meercat
03-18-2009, 01:01 AM
thanks
meercat
03-19-2009, 08:35 PM
After a bit more testing, and I am not 100% sure of this, but would appreciate your comment, it seems that %_SB_ERRORCODE% returns 0 if the file copied successfully or there is no need for the file to be overwritten as it has the same CRC value. Otherwise, it returns -1.
If this is the case, and as I said, it appears to be so, is there a return code for the case where there is no need for the file to be installed?
Thanks again,
Alex
linder
03-20-2009, 02:44 AM
Alex,
No, if the file is skipped, then the return value in %_SB_ERRORCODE% will also be -1.
Friedrich
linder
03-20-2009, 02:49 AM
BTW, a file installation error is always a fatal error. In other words, if there was a file install error then the installation is aborted immediately.
So if you see -1, it can be interpreted as "file skipped".
Friedrich
meercat
03-20-2009, 07:18 AM
ok, thanks, that will work.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.