z3r0c00l12 Posted December 19, 2010 Share Posted December 19, 2010 I ran into a small glitch (I Think), although it's not affecting my script, it is generating an error but then continues. $Status = RunWait("msiexec /i " & $File & " /quiet /norestart") If $Status = 0 Then ConsoleWrite("RunWait Status: " & $Status & ", @Error = " & @Error) EndIf In the example above, The $file is ran and executed properly, but then I will get the following output: RunWait Status: 0, @Error = 0 Which according to the Help guide shouldn't happen as RunWait failure says: "Returns 0 and sets @error to non-zero." Could it be that "msiexec.exe" returns 0 as the exit code? If this is the case, shouldn't the help guide warn us about this behavior? Link to comment Share on other sites More sharing options...
DCCD Posted December 19, 2010 Share Posted December 19, 2010 I ran into a small glitch (I Think), although it's not affecting my script, it is generating an error but then continues. $Status = RunWait("msiexec /i " & $File & " /quiet /norestart") If $Status = 0 Then ConsoleWrite("RunWait Status: " & $Status & ", @Error = " & @Error) EndIf In the example above, The $file is ran and executed properly, but then I will get the following output: RunWait Status: 0, @Error = 0 Which according to the Help guide shouldn't happen as RunWait failure says: "Returns 0 and sets @error to non-zero." Could it be that "msiexec.exe" returns 0 as the exit code? If this is the case, shouldn't the help guide warn us about this behavior? Kill msiexec.exe, Let's see what you got . [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group Link to comment Share on other sites More sharing options...
wakillon Posted December 19, 2010 Share Posted December 19, 2010 (edited) As msiexec.exe is still running after script end you can't get his exit code... Edited December 19, 2010 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
z3r0c00l12 Posted December 19, 2010 Author Share Posted December 19, 2010 (edited) As msiexec.exe is still running after script end you can't get his exit code...I think you are right, as I tested, msiexec launches itself 3-4 times during the install, by the time the RunWait returns, there is still one instance of msiexec running that never seems to close.Kill msiexec.exe, Let's see what you got I closed msiexec (the one launched by the script) as soon as it started and got an exit code of 1, so I'm guessing msiexec uses a batch file type of ERRORLEVEL, 0 being successful, and 1+ being an error. Edited December 19, 2010 by z3r0c00l12 Link to comment Share on other sites More sharing options...
wakillon Posted December 20, 2010 Share Posted December 20, 2010 (edited) you can try to log msi install To set logging level Syntax msiexec /L [w][e][a][r][c][m][p][v][+][!]LogFile.txt and see errors codes ! Edit : i remember me there was a MSI Return Codes topic or post... Edited December 21, 2010 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now