total vbs scripting newb here. I\'m trying to automate closing a certain open window, namely a program called HostsMan. This is on Windows 8.1 Pro 64 bit, and this is what m
The key here is to put a small pause after the 'run' command but before the 'appactivate' command so the application shows up in the process list.
WshShell.Run "calc" WScript.Sleep 100 WshShell.AppActivate "Calculator"