Make Outlook your biznatch using batch files and customized rules.
I have recently fallen in love with having outlook run batch files -depending on what an email from me to me says.
They say necessity is the mother of all inventions and that is certainly true when it comes to scripting. I have been using a WM 6 device with no push email support and popping a pop3 account on the run.
I make sure to offline my outlook before leaving my office. Too Bad The Admin has a horrible short term memory – I would often forget and this would lead to missed messages and angry people in need of support cursing my name.
Now we couldn’t have that, so I started looking for an app that would offline outlook for me as I locked my machine. That didn’t happen… Not even close.
So I looked into a batch file to shutdown outlook also no go. so I said fuck it and used pskill in a script to terminate the process called outlook as seen here:
taskkill /F /im outlook.exe
Next I went into outlook and created a new rule from scratch. When new messages arrive from a specific account, from specific sender and with the specific subject shutdownoutlook.
Now when I send a email to myself and outlook is open it will process the message see who it is from check the subject and run my script.
Bingo. Emails flowing into my handheld again. so I can do this on the fly. since then I created scripts for restarting my PC, IIS and other apps.
What do you script? Do you automate on a day to day basis?
Anyone know how to make a script run on lock workstation?
DONT BE SHY!! Comment Young Admins!
_TheScriptin’AdmiN_
Back From AtA’s Archives!


June 26, 2007 - 12:42 pm
An awesome tool for scripting is AutoIt which I used at my last company to autologin to the phone system every morning at 8:00am because my boss at the time was using our call center phone system logs as a sort of time clock. If we were a few minutes late in the morning logging in he would ask us to note it in the pay system accounting would use, and dock our selves for the time we missed. The problem was that the script wouldn’t run when the screen was locked, so I set the computer to reboot everyday about 10 minutes before hand, autolog me in, run the phone system login script then lock the workstation. I never had to dock myself again ;-)
Click to Reply to This Comment.
June 26, 2007 - 1:40 pm
how does this autoit work is it freeeeeee?
Can it work with web based time punch systems>????
Click to Reply to This Comment.
June 26, 2007 - 1:47 pm
AutoIt is completely free. It will work on anything. When I used it for the phone system, I programmed mouse movements and button clicks. I programmed it to type certain things. it is really versatile. It comes with a help program so you can easily look stuff up. When you are done writing and testing your script, you can then compile it into a self running executable to run on other systems.
Click to Reply to This Comment.
June 26, 2007 - 1:48 pm
Let me rephrase that…Autoit will work on any Windows based programs.
Click to Reply to This Comment.
June 26, 2007 - 2:01 pm
I once wrote a script with it that works on Windows XP or newer that locks the workstation and runs in a never ending loop. It is a fun practicle joke program that you can execute on someone elses screen so it will lock the screen, then when they log back in it will automatically lock the screen again. It doesn’t hurt any data, and is quickly resolved by a reboot (unless you drop it in their startup folder). You can try it out here
Click to Reply to This Comment.
June 26, 2007 - 2:08 pm
that is the funniest thing i have ever saw. i just put it on my buddies machine while he is @ lunch. Im not mean enuff 2 put it in his startup though!
Only safemode will fix that1.
Click to Reply to This Comment.
June 26, 2007 - 2:27 pm
As long as you only put it in his startup and not the all users startup, you could just login with another account and delete it.
I Once put it in the all users startup for a new help desk we we had. He spent a good 2 hours troubleshooting, and just before he was about to re-image, I let him in on the gag. If you put it in the all users startup, even safe mode won’t help. I had him reboot and not login, then I used the UNC path to his machine and deleted it. Everyone was rolling!
Click to Reply to This Comment.
June 26, 2007 - 2:37 pm
JohnBlaze: Let us know how your buddy reacted :-)
Click to Reply to This Comment.
June 26, 2007 - 4:24 pm
Very creative solutions guys. Good stuff.
Click to Reply to This Comment.
June 26, 2007 - 4:59 pm
Yeah Johnny Blaze How’d that joke go over?
Anyone have any review for AutoIT other than El Di Pablo’s setup at his old job. We just got to be careful they dont get a script to automate the Admins Job!
Click to Reply to This Comment.
June 27, 2007 - 10:34 am
He is still toiling away at his workstation when he goes for the format i will let him in on the secret!
I just hope im around :) (going on 18 hours or so now!)
Click to Reply to This Comment.
December 16, 2007 - 8:07 pm
Terminating a process forcefully it’s not a thing to brag about :D.
I’d say using the afore mentioned AutoIt (or it’s [smarter] equivalent – Autohotkey) to close Outlook normally, is a better solution.
PS: being open minded when designing polls it’s nothing to be ashamed of. What the Firefox fans are doing now ain’t further than the *crimes* M$ is accused of.
Good day.
Click to Reply to This Comment.