make windows automatically restart

is there a way to run shutdown -r -t 0 without login to restart computer automatically?

i need to restart manually once, then it will restart again automatically without logon.

im looking for a registry key that i can add shutdown command to it

runonce requires logon, which is not what i want.
IkelcaAsked:
Who is Participating?
 
IkelcaConnect With a Mentor Author Commented:
it's ok
i found a solution which is adding scheduled task
thanks guys
0
 
Andrej PirmanCommented:
Doing restart prior to login, seems bad idea - windows state is reset only AFTER login, so many changes are not applied if you restart before login. Meaning, only services are set, aplications not.

But is you know what you want, this is right reading for you - you have all REG keys and startup options explained here:
http://www.bleepingcomputer.com/tutorials/windows-program-automatic-startup-locations/
0
 
IkelcaAuthor Commented:
yes, i understand about restart and logon and i do need it restart automatically without logon.

http://www.bleepingcomputer.com/tutorials/windows-program-automatic-startup-locations/
i have already got to this website before posting here.
the following keys are the only thing on that website and it dose not work for me as i tested
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
Andrej PirmanCommented:
Those 2 keys are CORRECT, but they are talking about SERVICES, not programs.
So your program needs to run as a service, using credentials of user, who has permisisons to "Logon as a service" (look in "Local Security Policy").
To run program/application as a service, look into, for example, Srvany.exe
0
 
IkelcaAuthor Commented:
Labsy, i havent tried ur solution yet, but a question, after service is installed and it will run very time how to automatically uninstall it after 2nd restart??
0
 
johnb6767Commented:
"yes, i understand about restart and logon and i do need it restart automatically without logon."

What part of the startup process do you need it to reboot?

And I almost have to ask why? I cannot think of a good reason to do this.....
0
 
IkelcaAuthor Commented:
ok, the reason is GPO in AD somehow does not get downloaded to local pc and for some reasons, one reboot normally does not do it, most of time, i need to reboot twice.
troubleshooting AD side will be disaster due to extremely large WLAN
0
 
IkelcaAuthor Commented:
found solution myself
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.