I am trying to create a script that can open a program, pause for 1 minute and then close the program.
I have successfully been able to open the program and pause but cannot get the script to close the program.
Here is my script.....
Set ObjShell = CreateObject("WScript.Shell")
ObjShell.Exec ("C:\Program Files\Norton Internet Security\Engine\21.1.0.18\uistub.exe")
WScript.sleep 60000
ObjShell.SendKeys "%{F4}"
The program window just stays open but if I manually key in Alt+F4 on the keyboard, then the window closes.
I have tried this script to open notepad.exe, pause and then close and it works ok.
Any help would be much appreciated
Thanks
I have successfully been able to open the program and pause but cannot get the script to close the program.
Here is my script.....
Set ObjShell = CreateObject("WScript.Shell")
ObjShell.Exec ("C:\Program Files\Norton Internet Security\Engine\21.1.0.18\uistub.exe")
WScript.sleep 60000
ObjShell.SendKeys "%{F4}"
The program window just stays open but if I manually key in Alt+F4 on the keyboard, then the window closes.
I have tried this script to open notepad.exe, pause and then close and it works ok.
Any help would be much appreciated
Thanks