Solved

Simple Batch File

Posted on 2004-09-29
3
1,887 Views
Last Modified: 2012-06-21
Hi, I was just wondering if anyone can help me. I want to create a simple batch file so that I can back up my information every night. I have the backup part covered, the only problem is that It cannot back up out look while it is still running.

Is there any way I can stick something in my batch program to close Outlook before running the backup code, and then restart Outlook as soon as it is finished?

All help is much appreciated!

Thank you!

Bick
0
Comment
Question by:bick2000
3 Comments
 
LVL 3

Accepted Solution

by:
PodExpert earned 500 total points
Comment Utility
You can close any application using a command TASKKILL by specifying the application title (or other parameters, but the title will be your case, I suppose). Try this:

taskkill /fi "WINDOWTITLE eq Outlook"

I am not using Outlook, so I don't know, whether the widnow title is Outlook or Microsoft Outlook or whatever - just put there the right thing and here we go. Taskkill will close the application safely, as it is done by user's intervention. When you use /f switch, it will perform forced shutdown of the app.

Regards.
P.
0
 
LVL 4

Expert Comment

by:avi247
Comment Utility
0
 

Author Comment

by:bick2000
Comment Utility
I ended up using task kill, with not the window title, but "SERVICES eq" switch or option!

Works great! Thanks for the help!

Bick
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
A short article about problems I had with the new location API and permissions in Marshmallow
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now