Computing.Net > Forums > Windows 2000 > batch file as a service

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

batch file as a service

Reply to Message Icon

Name: bigsoftwalker
Date: May 3, 2002 at 08:05:28 Pacific
Comment:

I need to make a batch file run as a service instead of on screen. I have a web server that runs a live java program that leaves a dos window open and I can only lock the console. if I could run the batch as a service then it could be logged off and logged on by other users.



Sponsored Link
Ads by Google

Response Number 1
Name: KB
Date: May 3, 2002 at 10:11:42 Pacific
Reply:

You need srvany.exe from the resource kit. This may not work if the program opens any windows.

From a command prompt type:
INSTSRV MyJavaService c:\Program Files\Resource Kit\srvany.exe

Add any directories from which dll's will be loaded to the system path

Modify Registry to add Parameters needed for your program
Start>Run>REGEDT32
Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
You should see the MyJavaService service that you added
Click one of the services to select it, then click Edit>Add Key and enter: Parameters
Click Parameters to select it, then click Edit>Add Value
In the Value Name box type Application
In the String box type d:\path\ToMyProgram\MyProgram.exe
Click Parameters to select it, then click Edit>Add Value
In the Value Name box type AppParameters
In the String box type /switch=option
Click Parameters to select it, then click Edit>Add Value
In the Value Name box type AppDirectory
In the String box type d:\path\ToMyProgram\


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows 2000 Forum Home


Sponsored links

Ads by Google


Results for: batch file as a service

Running files as a service www.computing.net/answers/windows-2000/running-files-as-a-service/32523.html

Registering an exe as a service www.computing.net/answers/windows-2000/registering-an-exe-as-a-service/47896.html

making a small program run as a service www.computing.net/answers/windows-2000/making-a-small-program-run-as-a-service/24251.html