Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alternative to RunServices in Win 2000 Server

Status
Not open for further replies.

mcmcom89

Programmer
Nov 23, 2005
7
CA
Hi all,

I created a little .exe file that basically starts a wake on Lan for another server i have. I want it to run automatically when windows 2000 server starts up I tried putting it in the registry under currentversion\run but that only fires when someon logs into the server. I read that runservices registry key runs before the login screen is shown but it appears not to work on Win2000 Server (only ME 98 XP, according to MS) So I was looking for an alternative place in the registry to put a key to run this console app.

Any help appreciated!!!

Alternatively could i put this into autoexec.bat? Does win2000 server even use that anymore?

thanks

mcm
 
Windows 2000 allows the use of any AUTOEXEC.BAT like startup batch file for command line sessions by introducing the AutoRun registry key, as in this example:

[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
AutoRun=C:\STARTUP.CMD

Replace C:\STARTUP.CMD with any other batch file you like to run at startup of command line sessions.

Warning: To use this feature you need to edit Windows 2000's registry.
Changing the registry manually is a potential risk to your system; it may never function again.
Use this information entirely at your own risk.
 
hi,

thanks for the quick reply. I am having some troubles still though

I went to HKEY_CURRENT_USER\Software\Microsoft\Command Processor and added a new String value called AutoRun.

In that i put the value data as

C:\Sandbox\Utils\WakeOnLan.exe

however it does not seem to work. Could it be trying to run it but perhaps (because it sends a ethernet packet out) the ethernet is not set up at the point it fires? Or do i have it written wrong.

thanks again,
mcm
 
nope, neither one of them work. Also i learned that the AutoRun key should only be used for things like CD Players and Memory Keys, there has to be a better way...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top