Logoff Idle Windows Sessions via Screen Saver
Nice little script that allows to you to popup a message box to the end user warning them they will be logged out in 1 minute unless they click CANCEL when the screen saver kicks in.
The EXE and SCR are the same thing (one does not need the other). A little known fact about Windows....if you rename an EXE to SCR, you can still launch it like an EXE but also launch it through the Screen Saver settings.
Since I wrote it in KiXtart, the actual base code is this simple call....
$OKCancel = MessageBox("Your Windows Session has been idle for too long and you are about to be logged off!@CRLF@CRLFIf you do not wish to be logged of, Please select CANCEL Now! Otherwise, your Windows Session will be logged off in less than 1 minute.", "Logging Off Your Session!", 262193, 60)
If Not $OKCancel = 2
$Nul = LogOff(1)
EndIf
Essentially, this is popping a message box to the end user warning them they will be logged out in 1 minute unless they click CANCEL. If you use the "/SHOWCODE" switch, all of the rest of the stuff is the code for the "/SHOWCODE" switch to work.
To implement:
- Put the SCREENSAVER LOGOFF.SCR in the SYSTEM32 folder on the base Windows image (rename the file if you need to).
- In a GPO, enforce this as the screen saver and set the timeout desired.
- Apply the GPO however desired (Group, Machine, Users, etc.).
Source: http://t3chnot3s.blogspot.com/2011/04/logoff-idle-windows-sessions-via-screen.html
Similar Posts:
- Introducing MSTSC /admin
- Flex Profiles 7.5 Announced, Packs New Features
- Microsoft Server Application Virtualization Remote Application Packager
- Quest vWorkspace Connector for Android version 1.1
- vWorkspace Connector for Android version 1.1
June 1st, 2011 - 19:23
…Or you could go with the old winexit.scr from W2003 RK -> http://www.microsoft.com/downloads/en/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd