Sign in to follow this  
Followers 0
z3r0c00l12

RunWait Error

5 posts in this topic

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?

Share this post


Link to post
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

.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

As msiexec.exe is still running after script end you can't get his exit code...

Edited by wakillon

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

Share this post


Link to post
Share on other sites

#4 ·  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

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 ! 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

Share this post


Link to post
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
Sign in to follow this  
Followers 0