marcmc
asked on
Run CMD on boot
Hello, my problem is as follows:
I want to run a CMD after computer's reboot, with no user logged on.
I can't use AT commands or install services.
Is there any Registry Entry that can run a command only when computer starts (and after disappear)?
Thank you,
P.D. I'm an administrator, and the machines are NT 4.0 SP5.
I want to run a CMD after computer's reboot, with no user logged on.
I can't use AT commands or install services.
Is there any Registry Entry that can run a command only when computer starts (and after disappear)?
Thank you,
P.D. I'm an administrator, and the machines are NT 4.0 SP5.
HKLM/Software/Microsoft/Wi ndows/Curr ent Version/RunOnce.
ASKER
That's the problem. Any user logs on when the computer reboot. I need another way.
What exactly do you need to do ?
What CMD do you need to run ?
SMS / WinInstall would do the trick.
You could use a login script to run at user logon and place a tag file on the system so that it wouldn't run again ?
What CMD do you need to run ?
SMS / WinInstall would do the trick.
You could use a login script to run at user logon and place a tag file on the system so that it wouldn't run again ?
>>That's the problem. Any user logs on when the computer
>>reboot
This is no problem - it doesn't matter which user logs on, the result will always be the execution of your command file (BTW: That's the way MS recommends to install service packs in unattended setups...)
>>reboot
This is no problem - it doesn't matter which user logs on, the result will always be the execution of your command file (BTW: That's the way MS recommends to install service packs in unattended setups...)
ASKER
Sorry, my comment is incorrect. When the computer reboot, no user log into in a few hours, and I want to execute the CMD command immediately.
why cant you run the cmd, as a service ?
You'll have to run the command as a service or use bchew's registry suggestion.
Nither way requires a user logon.
Nither way requires a user logon.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Placing an entry under
HKEY_LOCAL_MACHINE\SOFTWAR
Will cause the .cmd file to run when the first user logs on. This has to be sth. like
myentry = "cmd.exe /c c:\path\mycmd.cmd"
where 'myentry' is the value's name...