Solved

Simple Batch File

Posted on 2004-09-29
3
1,915 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
ID: 12183500
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
ID: 12183907
0
 

Author Comment

by:bick2000
ID: 12184627
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an explanation of a simple data model to help parse a JSON feed
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

808 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