July 14th, 2003, 12:04 PM
|
#1 (permalink)
|
| Ultimate Member
Join Date: Oct 2001 Location: Cincinnati Area
Posts: 1,761
| Windows Scripting programming...HELP
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
__________________
"Oh, you hate your job? Why didn't you say so? There's a support group for that. It's called EVERYBODY, and they meet at the bar." - Drew Carey
|
| |