Faithful user of WinBatch since 1996 here. And to be honest I have never gotten the hang of the Control Manager Extender. And Ive tried - really.... I just dont get it.... Not even sure I can use it here. I have usually gotten away with send keys and mouse clicks over the years. Im trying to help someone that has 4000 Win10 machines so old their SUS server wont update them. And their environment is so locked down I am very limited in what i can do - i cant even elevate privilege, run powershell, etc. What I have had limited success is sending keystrokes to the Windows update screen - note - they cant just click the button to check for updates - they have to choose the option link below it to "Check online for updates from Microsoft Update". So, my code snippet is below. The problem is it is not reliable. If for some reason the machine was already updating, the keystrokes will "pause" the updates, or restart the machine. What Im asking - is it possible to 1) control this dialog to "click" the link to check Microsoft update? 2) Is it possible to wait/look for a "restart" button if it exists in that window and then click it? Im hoping someone already has some code that can do this they are willing to share. Thanks in advance!
Run("cmd.exe", "/c control.exe /name Microsoft.WindowsUpdate") ; 4 tabs to do the update from microsoft option.....
WinWaitExist("Settings", 30)
delay(5)
SendKeysTo("Settings", "{tab}")
Delay(.1)
SendKeysTo("Settings", "{tab}")
Delay(.1)
SendKeysTo("Settings", "{tab}")
Delay(.1)
SendKeysTo("Settings", "{tab}")
Delay(.1)
SendKeysTo("Settings", "~")
Delay(.1)
WinClose("Settings")