Sign in to follow this  
Followers 0
Theo

runWait with system commands

9 posts in this topic

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

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

bumpity?


Systems AdministratorSiemens: Windows Server SupportFly Fisher, Table Tennis Junkie, and Struggling Coder

Share this post


Link to post
Share on other sites

Manadar, really?

Use WinWaitClose("title").

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

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