> I tried installing a microsoft security patch for XP using os.system > method on windows 2000 professional. The installtion failed because of > incompatibility, but it still returned an exit code of ' 0 '.I also > tried using os.popen2,3,4 methods but didnt work.Any Inputson how i > can get the correct exit error code?.. > > I tried the following commands > os.system('patch_name /q/z/m') > and > os.popen2('patch_name /q/z/m') > > http://msdn.microsoft.com/library/default.asp?url=/library/en- > us/msi/setup/error_codes.asp
My guess is that the process is simply always returning zero. You can confirm this by writing a batch file and using "if errorlevel" - eg: patch_name /q/z/m if errorlevel 1 echo Failed And seeing if you see "Failed" printed when running the .bat file from a command-prompt. Mark _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32