Solved

Running a batch file as a service

Posted on 1998-02-02
6
210 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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Nslookup is a command line driven utility supplied as part of most Windows operating systems that can reveal information related to domain names and the Internet Protocol (IP) addresses associated with them. In simple terms, it is a tool that can …
The Need In an Active Directory enviroment, the PDC emulator provide time synchronization for the domain. This is important since Active Directory uses Kerberos for authentication.  By default, if the time difference between systems is off by more …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

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

18 Experts available now in Live!

Get 1:1 Help Now