Jump to content

RunWait Error


Recommended Posts

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

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

.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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 ! Posted Image

Edit : i remember me there was a MSI Return Codes topic or post...

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...