Advertisement

04.20.2007 at 02:15PM PDT, ID: 22524877
[x]
Attachment Details

Calling a batch file from a windows service.

Asked by SuttonJ1 in Scripting Languages, Microsoft Windows Operating Systems, Windows Batch Scripting

Tags: file, service, batch, windows

I am setting up MRTG to create graphs that show the number of files in a folder (Mail queue).
I created a batch file that will check the folder and return the number of files.
In MRTG, I've created my .cfg file that will call the batch file.  It works from the command line.
It logs and creates the graphs fine.

I used SRVANY and INSTSRV to create the MRTG service and it is configured correctly.  The service runs, but no data is collected, because (I'm sure) that the batch file is not running.

So I need to know if it is possible to call a batch file from a windws service?Start Free Trial
 
Loading Advertisement...
 
[+][-]04.20.2007 at 02:20PM PDT, ID: 18949704

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.20.2007 at 06:07PM PDT, ID: 18950400

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Scripting Languages, Microsoft Windows Operating Systems, Windows Batch Scripting
Tags: file, service, batch, windows
Sign Up Now!
Solution Provided By: jkorsak
Participating Experts: 3
Solution Grade: A
 
 
[+][-]04.22.2007 at 05:40AM PDT, ID: 18954011

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2007 at 05:42AM PDT, ID: 18957944

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.23.2007 at 05:57AM PDT, ID: 18958042

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2007 at 01:35PM PDT, ID: 18969303

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32