MHz Posted October 22, 2004 Share Posted October 22, 2004 Run(@ScriptDir & '\i386\winnt32.exe /cmdcons', '', @SW_HIDE) WinWaitActive('Windows Setup', '', 10) If @error = 1 then Exit Send('!y')Success: Returns 1. Failure: Returns 0 if timeout occurred.Why does error = 1 in the script let the installation proceed but error = 0 quits? Link to comment Share on other sites More sharing options...
jpm Posted October 22, 2004 Share Posted October 22, 2004 I don't understand your problem because on @error= 1 the script exit Link to comment Share on other sites More sharing options...
SlimShady Posted October 22, 2004 Share Posted October 22, 2004 (edited) The value of $WinActivated can be 1 or 0 in the following example. @error is not set when using the function. And when @error is not set (not mentioned in the help file page) it is equal to 0. Run(@ScriptDir & '\i386\winnt32.exe /cmdcons', '', @SW_HIDE) $WinActivated = WinWaitActive('Windows Setup', '', 10) If NOT $WinActivated then Exit Send('!y') Edited October 22, 2004 by SlimShady Link to comment Share on other sites More sharing options...
MHz Posted October 22, 2004 Author Share Posted October 22, 2004 I don't understand your problem becauseĀ on @error= 1 the script exit<{POST_SNAPBACK}>But, when when @error = 1, the script continues? Does not quit.Seems inverse to what the guide states?I understand the line to be If @error = 0 then Exit. That would mean that timeout occured and script would exit. As in failure? Link to comment Share on other sites More sharing options...
jpm Posted October 22, 2004 Share Posted October 22, 2004 But, when when @error = 1, the script continues? Does not quit.Seems inverse to what the guide states?I understand the line to be If @error = 0 then Exit. That would mean that timeout occured and script would exit. As in failure?<{POST_SNAPBACK}> Sorry for my answer I should have say that WinWaitActive never set @error so the correct code is the SlimShady one Link to comment Share on other sites More sharing options...
MHz Posted October 22, 2004 Author Share Posted October 22, 2004 Thanks jpm for confirm. Will accept SlimShady solution. 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