Reboot On Shutdown - XP

Associate
Joined
18 Oct 2002
Posts
1,704
Location
Glasgow
Reboot On Logoff From Remote Desktop

Guys,

I run remote desktop on a machine in the loft.

I want to be able to, when i logoff run a resart command.

I already have a shortcut on the desktop which relates to shutdown -r -t 01 on the command line and that works a treat but i would like that to run everytime the machine is logged off.

Any ideas?

Cheers
 
Last edited:
If you use Ctrl+Alt+End you can bring up task manager within your RDP window. From there you can select restart and robert's your mother brother (or something)
 
hi mate

thats not what i mean

i already have the ability to reboot the machine from Remote Desktop by using the icon i have created which runs shutdown -r -t from the command line

what im really looking for is somthing which will run it automatically on logoff
 
Hi M0KUJ1N,

If you go to Run and run the command mmc you should see a window open called "console1" or something similar. Go to File>Add/Remove SnapIn - now click "Add" - youll see a list appear and you want to select one thats called Group Policy or Local Group Policy. Now if you ok out of all that you should have your console1 window again, you might have to Expand the list but your looking for the user section, under that youll see a logon/loggoff section where you can set batch files etc to run on logon or loggoff.

Hope this helps, doing this all from memory so hope its close enough :D
 
It wasn't me that posed the original question :), plus wouldnt using Local Group Policy to do this be:

a) an abuse of Group Policy (imo)

b) Perform the reboot on logoff for that user whether they are logged in locally or remotely.

c) An increased likelihood of corrupted user profiles in the (admittedly rare) event that the restart command is issued before the profile state is completely saved.

/me awaits a similar thread from the OP in about a month asking "My machine reboots itself every time I log off, any ideas?"

Like I said before, the correct way to restart a machine is to actually issue a restart request from taskmanager etc. If you still, absolutely positively want to run it from a click button either use the script here
or put a -f to force the reboot (shutdown commands enerate an extra dialogue box when RDPed to remind the user that once the machine is shutdown it cant be restarted remotely).
 
Back
Top Bottom