Re: Windows log off
From: Kelly (kelly_at_mvps.org)
Date: 01/06/05
- Next message: Kath Adams: "Re: GMail"
- Previous message: Kelly: "Re: Windows: Delayed Write Failed"
- In reply to: Daniel: "Windows log off"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 6 Jan 2005 01:46:36 -0600
Hi Daniel,
Automatically log off a user or shut down your machine: You can incorporate
Rundll32 into your Windows Script Host (WSH) or command-shell scripts to log
off the current user or shut down and restart the computer. The value in the
command's last parameter controls the action that will occur: 0 performs a
logoff, 1 performs a shutdown, 2 performs a reboot, 4 performs a forced
shutdown, and 8 powers down the machine. The following example performs a
logoff:
rundll32.exe shell32.dll,
SHExitWindowsEx 0
Added info:
You can schedule a task to lock the desktop after a period of
inactivity.
Start/All Programs/Accessories/System Tools/Scheduled Tasks. On the last
screen, check off Show Advanced Options. Under Advanced/Settings/Idle Time
(Only start... and Stop the task...).
You can schedule a task for inactivity. Use this to lock the
desktop after 10 minutes of idle time.
Use this shortcut for the task:
%windir%\System32\rundll32.exe user32.dll,LockWorkStation
C:\Windows\System32\rundll32.exe user32.dll,LockWorkStation.
To log off and run the risk of having your programs end prematurely and
without saving any unsaved material, you could use the same scheduled task
command and replace the LockWorkStation with ExitWindows. That will log off
the currently logged on user.
To schedule a logoff procedure for XP, use this:
C:\Windows\System32\shutdown -l as the scheduled task.
A scheduled task can be run without passwords:
For Pro: Start/Control Panel/Administrative Tools/Local Security
Policy/Local Policies/Security options. In the right hand pane (third down).
Accounts: Limit local account use of blank passwords to console logon only.
This is enabled by default, disable it.
For Home: Run Scheduled Task without a Password (Line 68)
http://www.kellys-korner-xp.com/xp_tweaks.htm
Easy Log Off, Shutdown and Restart (Line 89)
http://www.kellys-korner-xp.com/xp_tweaks.htm
-- All the Best, Kelly (MS-MVP) Troubleshooting Windows XP http://www.kellys-korner-xp.com "Daniel" <Daniel@discussions.microsoft.com> wrote in message news:533E5D40-A5DE-4D04-BFF9-1C6CF0F1EB51@microsoft.com... > Is there a way to force automatic log off for an idle session? > I need to set up a WinXP computer wihich is in Windows 2003 domain with an > ability to force a log off of a user which stopped using the computer but > didn't log off. I need to allow some kind of session time out in a case > of > extended inactivity (lets say 10 minutes). I wonder if there are any > built > in mechanisms to do it? > This is in an environment where there are multiple users who need rather > infrequent access to the computer but often forget to log off.
- Next message: Kath Adams: "Re: GMail"
- Previous message: Kelly: "Re: Windows: Delayed Write Failed"
- In reply to: Daniel: "Windows log off"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|