Theo Posted December 14, 2009 Posted December 14, 2009 As a part of a build follow up script, users need to do certain manual configurations because there are too many variables to plan for in the script. I am having a hard time finding a way to have the script pause and wait until these items are closed. This was my last attempt, but it did not work either. Thanks. ; configure Drives MsgBox (0, "Drive setup", "Please complete Drive Setup per project info" & @CRLF & "Close Disk Manager to continue", 5) ShellExecuteWait( "c:\windows\system32\diskmgmt.msc" ) ; Configure and verify NIC settings MsgBox (0, "Network Connections", "Please configure connections 1000F and disable IPv6 and unused NICs" & @CRLF & "Close Network Connections to continue", 5) ShellExecuteWait( "c:\windows\system32\ncpa.cpl" ) Systems AdministratorSiemens: Windows Server SupportFly Fisher, Table Tennis Junkie, and Struggling Coder
jvanegmond Posted December 14, 2009 Posted December 14, 2009 You can always check if the newly created setup windows have disappeared. I'm not sure why your correct setup is not working. github.com/jvanegmond
Theo Posted December 15, 2009 Author Posted December 15, 2009 You can always check if the newly created setup windows have disappeared. I'm not sure why your correct setup is not working.In the case above, there is no waiting. It pulls up Disk Manager and then moves on to the next messageBox. Then opening of the .cpl fails with an unknown file extension. Using other means, runWait, the .cpl will open, but again there is no wait until closed. Systems AdministratorSiemens: Windows Server SupportFly Fisher, Table Tennis Junkie, and Struggling Coder
Theo Posted December 15, 2009 Author Posted December 15, 2009 bumpity? Systems AdministratorSiemens: Windows Server SupportFly Fisher, Table Tennis Junkie, and Struggling Coder
jvanegmond Posted December 15, 2009 Posted December 15, 2009 (edited) I'm not sure if you understand so I will give an example. I mean instead of doing this: RunWait("notepad") You can do: Run("notepad.exe") WinWait("Untitled - Notepad") While WinExists("Untitled - Notepad") Sleep(100) Wend Does this help? Edited December 15, 2009 by Manadar github.com/jvanegmond
Richard Robertson Posted December 15, 2009 Posted December 15, 2009 Manadar, really? Use WinWaitClose("title").
jvanegmond Posted December 15, 2009 Posted December 15, 2009 Excuse me. That function didn't exist when I was learning. github.com/jvanegmond
Theo Posted December 15, 2009 Author Posted December 15, 2009 Ok, will give it a try. both of those apps take a few seconds to launch so hopefully the script wont blow right by the winwait or otherwise. Thanks! Systems AdministratorSiemens: Windows Server SupportFly Fisher, Table Tennis Junkie, and Struggling Coder
jvanegmond Posted December 15, 2009 Posted December 15, 2009 Ok, will give it a try. both of those apps take a few seconds to launch so hopefully the script wont blow right by the winwait or otherwise. Thanks!You can specify a timeout value for the WinWait function. By default, a timeout is not on at all. github.com/jvanegmond
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