shutdown/reboot after user logoff
i am trying to make a scheduled task that shuts a computer down and restarts after every user logoff. in the scheduled task wizard i have the trigger as "on disconnect from user session" "any user" "connection on local computer" i just have shutdown.exe with the -r switch. what gives?
March 8th, 2010 11:49pm

i am trying to make a scheduled task that shuts a computer down and restarts after every user logoff. in the scheduled task wizard i have the trigger as "on disconnect from user session" "any user" "connection on local computer" i just have shutdown.exe with the -r switch. what gives? Edwin, This is a problem for you because the shutdown command in Windows essentially uses the ExitWindowsEx() API function to restart the computer. There is more described here under the heading of "Troubleshooting" - it relates to the computer being unlocked - but I would expect the logged off state provides a similar lack of interactivity to the shutdown utility.: http://support.microsoft.com/default.aspx/kb/317371 Knowing what you're after here - I'm not clear on the best way to actually make this happen - it may be through the use of a group policy or a third party application. If you do get it figured out I would love to know how. Thanks, Kevin Costain @calwell on Twitter Calwell's Blog Google Profile (Buzz)
Free Windows Admin Tool Kit Click here and download it now
March 9th, 2010 6:19am

Hi,Why won't you set the only option to reboot\restart and make"logg off" gray out from shut down botton?Open your registry and find or create the key below. Create a new DWORD value, or modify the existing value, called "NoLogOff" and set it according to the value data below. Exit your registry; you may need to restart or log out of Windows for the change to take effect. [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
March 9th, 2010 1:10pm

Hi,Why won't you set the only option to reboot\restart and make"logg off" gray out from shut down botton?Open your registry and find or create the key below. Create a new DWORD value, or modify the existing value, called "NoLogOff" and set it according to the value data below. Exit your registry; you may need to restart or log out of Windows for the change to take effect. [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] well the plan was to have an auto logoff after a timeout period, so disabling logoff wouldn't seem like a good option. i wanted timeout logoff->restart->etc. that was all automated.i wanted to do a timeout logoff->restart->auto boot into recovery to get a command prompt for diskpart/bcdedit->write a script to delete->recreate an differencing disk back to a parent vhd file->restart into the differencing disk natively.this would effectively put the system back to a prior state using differencing vhd files, but it seems like a huge pain considering i can't even get the automated logoff->force restart done.
Free Windows Admin Tool Kit Click here and download it now
March 11th, 2010 9:25pm

Well there might be a long workaround. First, enable the Automatic Restart Using Registry Editor: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl DWORD = AutoReboot 0 = Auto Restart Disabled 1 = Auto Restart Enabled Not using Registry Editor: System Properties - Advanced - [Startup and Recovery]Settings Remove the checkmark from "Automatically Restart" in the System Failure section. Then you need to manually create a timeout crash. EG:1. Start regedit. (If you are unfamiliar with regedit, please refer to this FAQ)2. Navigate to:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters3. Create a new DWORD value and name it CrashOnCtrlScroll4. Right-click on this newly created value and click on Modify5. Enter 1 in the Value data field and click on OK.6. Close regedit and reboot your system.7. Now you can crash your system by holding the right CTRL key and pressing "Scroll Lock" twice.
March 15th, 2010 1:48pm

Well there might be a long workaround. First, enable the Automatic Restart Using Registry Editor: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl DWORD = AutoReboot 0 = Auto Restart Disabled 1 = Auto Restart Enabled Not using Registry Editor: System Properties - Advanced - [Startup and Recovery]Settings Remove the checkmark from "Automatically Restart" in the System Failure section. Then you need to manually create a timeout crash. EG:1. Start regedit. (If you are unfamiliar with regedit, please refer to this FAQ)2. Navigate to:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters3. Create a new DWORD value and name it CrashOnCtrlScroll4. Right-click on this newly created value and click on Modify5. Enter 1 in the Value data field and click on OK.6. Close regedit and reboot your system.7. Now you can crash your system by holding the right CTRL key and pressing "Scroll Lock" twice. that still requires user input. remember this is supposed to logoff after a period of inactivity or by logoff, not by user input. winexit scr from the 03 server resource kit tools accomplished this but doesn't seem to work with windows 7. i am still messing around with just trying to create a scheduled task to do the same function but haven't been successful yet.
Free Windows Admin Tool Kit Click here and download it now
March 31st, 2010 12:06am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics