Solved

Running a batch file as a service

Posted on 1998-02-02
6
215 Views
Last Modified: 2013-12-19
My question is simple, and for those with time, probably easy to answer.  So earn a quick 100 points and help me here.

I am running NT Server 4.0 on a Dual Pentium Pro 200 system with 256 megs of RAM.  This is the intranet server here at work.

We have some java programs that require server side control to function (directory mapper, etc).  Right now, I have the java programs run when I login, but I don't want to have to be logged in.  If the server crashes, I can reboot it remotely, but logging the machine in is a problem.

I know this can be done, but I can't remember how.  All I want to do is have these batch files run as a system service.
0
Comment
Question by:libido011397
6 Comments
 
LVL 2

Expert Comment

by:igroove
ID: 1570753
Use the AT scheduler as an administrator.  Don't forget to enable it in your service control panel.

0
 
LVL 2

Expert Comment

by:moellert
ID: 1570754
The correct way is to use the srvany.exe program from the Rersourcekit. You will find a txt.file which explains the correct way to implement it. If you have any questions to feel free to ask me.
If this is the correct answer for you, please tell me and I will change this comment to an answer.
0
 
LVL 2

Expert Comment

by:moellert
ID: 1570755
The correct way to do this, is to use the srvany program from the Resourcekit. This tool makes it possible to run any program (exe, bat, cmd) as a service. You will find a txt.file which explains the correct way to implement it. If you have any questions to feel free to ask me.
If this is the correct answer for you, please tell me and I will change this comment to an answer.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:libido011397
ID: 1570756
Sorry, I just like moellert's answer more...

moellert:  Write that as an answer to receive the points
0
 
LVL 3

Expert Comment

by:os012897
ID: 1570757
There is also the free tool AutoExNT that lets you start a batch-file called autoexnt.bat where you in turn can do whatever u want.

Greetings,

        os

0
 
LVL 2

Accepted Solution

by:
moellert earned 100 total points
ID: 1570758
The correct way to do this, is to use the srvany program from the Resourcekit. This tool makes it possible to run any program (exe, bat, cmd) as a service. You will find a txt.file which explains the correct way to implement it. If you have any questions to feel free to ask me.
If this is the correct answer for you, please tell me and I will change this comment to an answer.  
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Internet Speed Test 5 137
Download Speeds - Speedtest is fast, everything else is slow 31 157
backup computers on Workgroup 10 80
Print to local printer - Windows 7 RDP 9 42
Greetings, Experts! First let me state that this website is top notch. I thoroughly enjoy the community that is shared here; those seeking help and those willing to sacrifice their time to help. It is fantastic. I am writing this article at th…
Are you one of those front-line IT Service Desk staff fielding calls, replying to emails, all-the-while working to resolve end-user technological nightmares? I am! That's why I have put together this brief overview of tools and techniques I use in o…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

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