Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Making command run on startup

Posted on 2003-03-25
8
Medium Priority
?
134 Views
Last Modified: 2010-04-13
We have an application Web server that whenever we reboot, I have to open a command prompt window, and run :  servletrunner -p 8081 -d d:\pendoc\servlet

The window has to stay open for this to run.

I need to figure out a way to do this automatically.  The big thing is getting it running in a DOS application window.  Is this even possible?
0
Comment
Question by:truckfanatic_com
  • 3
  • 3
  • 2
8 Comments
 

Accepted Solution

by:
Chr1s1nNYC earned 200 total points
ID: 8205381
use notepad to create a batch file with

START servletrunner -p 8081 -d d:\pendoc\servlet

in it and put the batch file in the Programs-Startup folder of the account you log in with.
0
 
LVL 10

Expert Comment

by:pbarrette
ID: 8205517
Hi Truckfanatic,

You will need to run this program as a Win2K service.

Look here for instructions using tools from the Resource Kit:
http://support.microsoft.com/?kbid=137890

pb
0
 
LVL 1

Author Comment

by:truckfanatic_com
ID: 8205526
Dude!  Thanks :-)
0
[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

 
LVL 10

Expert Comment

by:pbarrette
ID: 8205736
Hi Truckfanatic,

Keep in mind that the solution from Chr1s1nNYC will run your program only when the user logs into the computer.

pb
0
 
LVL 1

Author Comment

by:truckfanatic_com
ID: 8206046
But, from what I understand is that this servlett must be running in an open DOS window.  Is that possible to do with a service?
0
 

Expert Comment

by:Chr1s1nNYC
ID: 8206447
I didn't check what the exe in question was when I answered this question. I just went on the theory that if it worked from a DOS window manually a batch file would do the same thing. If it's a service then you should probably run it as one....
0
 
LVL 1

Author Comment

by:truckfanatic_com
ID: 8206515
It isnt a service...I would like it to be one, but I dont think it was possible.
0
 
LVL 10

Expert Comment

by:pbarrette
ID: 8211298
Hi Truckfanatic,

It looks like you are correct. The servletrunner program does not load correctly as a service.

I have looked around, however, and found this for you:
http://www.geocrawler.com/archives/3/6687/2002/6/0/8842636/

It's called MiniServer and is a replacement for servletrunner which will allow you to run your servlet as a Windows service. The link to the software on that page is incorrect. The correct link is here:
http://cjos.sourceforge.net/redist/mirror/jos1o/jos1o-minisrv1c-2-win.zip

More info here:
http://cjos.sourceforge.net/redist/wiki/M/MiniServer.html

pb
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

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

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Dropbox has a relatively new feature called Smart Sync.  This feature allows Dropbox Professional (not plus) and Dropbox Business (if enabled) users to store information in Dropbox WITHOUT storing any files on their computer.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month15 days, 14 hours left to enroll

580 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