Dear Valex,
I didn't read your post carefully, so this script may not work for your logoff case. Here it is - hope it helps.... I commented out the messagebox - its the same script I use on all my client desktops. I train them to log off at night or shutdown. ;-)
Option Explicit Dim Res, WshShell, ExitCode 'Res = MsgBox("Are you sure you want to logoff?", vbYesNo, "Logoff?") 'if Res = vbYes then Set WshShell = WScript.CreateObject("WScript.Shell") ExitCode = WshShell.Run("logoff", 10, TRUE ) Set WshShell = Nothing 'End if ' End code
CreateWindow http://justpageprobe.com The FREE Web page utility you always wanted. Monitor your enterprise Web Servers. Keep your router connected. Email your IP to where you need it. http://mymessagetaker.com Stop using those paper phone message pads make the computer work for you.
"Valex (Joe)" <joeboswell[ at ]gmail.com> wrote in message news:1179175282.623163.61010[ at ]e51g2000hsg.googlegroups.com...
[Quoted Text] >I did a bit of searching and couldn't find anything that I could > modify very easily as my scripting knowledge is quite limited in this > regard, I simply needed a VBScript that force quits everything and > boots the user off the computer. > > The idea is that I am taking it and putting it into a Scheduled Task > that checks for Idle time and then boots the user after a given amount > of time, the script will also be setting reg keys to log back in > automatically. > > Then a GPO will be overwriting those keys when the computer logs in so > that a user that walks up to the workstation will be able to log out > and get onto the workstation with his login. > > Pretty much easy except for the whole logout thing... > > Joe >
|