Jump to content

Recommended Posts

Posted

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?

Posted

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 :x

.

Posted (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 :x

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 by z3r0c00l12

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...