I have a developed a script that at some point in the code calls a VBScript that minimizes all current open Windows and displays a MsgBox. The script is set to run at startup so, other applications are also starting while the user logs in to the machine.
Batch code calling VBS – >
cscript //nologo lckPNot.vbs
lckPNot.vbs – >
set objShell = CreateObject("shell.application")
objShell.MinimizeAll
x=MsgBox ("Message Here.",0+48,"Notification")
The objShell.MinimizeAll
successfully minimizes all open current Windows however I face an issue once a window opens up after the objShell.MinimizeAll
and before the user provides his input to the MsgBox.
i.e. I need a way to say the following:
while MsgBox = Visible
Minimize All
Loop
If the above is not possible, I can also try to use the loop in the batch code itself, i.e. while lckPNot.vbs = Running Call KillProcesses.bat Loop
Where KillProcesses.bat
is another batch that kills all open tasks (instead of minimize) at a given point.
How can that be done?