Okay, I have never used VBS scripting, but I need help with a simple script. I am writing a batch file (yes..DOS batchfile) that will backup a users email based on four variables. If the user has Outlook as their client, the file can't be backed up if the program is left running. So, I need a way to kill the outlook.exe.
On one of the batchfile sites, they reccomended using this windows script:
Quote:
Dim wsh
Set wsh = CreateObject("WScript.Shell")
wsh.AppActivate "Outlook"
wsh.SendKeys "%{F4}"
|
However, it doesnt' seem to work. The only window that gets sent the alt+f4 is the current window that is open. Can anyone help me out with this? I basically need the script to find the open window "Microsoft Outlook" and kill it. It has to work in windows 9x/Me.
Thanks
Paul