You are not logged in.
Pages: 1
I am writing a batch file to go into a scheduled task in Windows 7. The complete project will automatically logoff a user after a period of inactivity.
A warning message will be displayed warning the user of the impending logoff, giving him/her a chance to continue staying in the user account. If the user has abandoned the computer leaving his/her account open ,the account will be closed after 60 seconds of the start of the warning message.
What I have so far follows:
LOGOFF.VBS
x=msgbox("There have been 15 minutes or more of inactivity on this computer. Automatic LOGOFF will occur in 60 seconds." ,292, "LOGOFF")
IF x=6 THEN
QUIT
ELSE
RUN SHUTDOWN /L
END IF
Offline
In the meantime I continued to look for a ready made answer to my cry for help.
A free screen saver that logs off a user account after a period of inactivity. Problem solved.
Offline
x=msgbox("There have been 15 minutes or more of inactivity on this computer. Automatic LOGOFF will occur in 60 seconds." ,292, "LOGOFF")
IF x=6 THEN
WScript.Quit
ELSE
set objShell = WScript.CreateObject("WScript.Shell")
Return = objShell.Run("SHUTDOWN.exe /L " & WScript.ScriptFullName, 1, true)
END IF
Offline
Pages: 1