Re: Scheduled Task for anyone who logs on
- From: "Kelly" <kelly@xxxxxxxx>
- Date: Thu, 14 Apr 2005 01:11:51 -0500
Modify it.
Added info:
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 suggestions and trial points:
C:\WINDOWS\system32\shutdown.exe -s -t 60 -c "Message goes here"
and the computer shuts down in 60 seconds with the message indicated.
You can use a Group Policy Computer (GPO) Configuration Logon
and/or Logoff script (The GPO can be activated manually with gpedit.msc or
through AD).
>From the Start menu Run dialog, open: gpedit.msc
Then, under "User Configuration",
open Windows Settings\Scripts (Logon/Logoff)
(double click, Add...).
More info in Tip 2147 in the 'NT Reg Hacks' at http://www.jsiinc.com
JSI Tip 2147. Windows 2000 Startup/Shutdown, Logon/Logoff scripts?
http://www.jsiinc.com/sube/tip2100/rh2147.htm
This handy program allows you to quickly and easily log off current user,
shutdown, power off and restart your computer. You could also schedule when
your computer should turn off. For the benefit of network administrators,
there is remote shutdown feature, which allows them to turn off any
computer.
http://eugenekonovalov.vlink.ru/EasyShutdown/EasyShutdown.exe
~~~
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
--
In memory of our dear friend, MVP Alex Nichol: http://www.dts-l.org/
All the Best,
Kelly (MS-MVP)
Troubleshooting Windows XP
http://www.kellys-korner-xp.com
"jped" <jped@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D41E2235-7ECD-42B5-BF12-66022B1FDDC9@xxxxxxxxxxxxxxxx
> Hi,
> I have a schedules task on a shared machine that logs the user off at a
> certain time. The task works fine, but it only works if I am logged on
> since
> I created it. Is there a way to setup the scheduled task to fun for
> anyone
> that is logged on?
>
> Thanks!
.
- References:
- Scheduled Task for anyone who logs on
- From: jped
- Scheduled Task for anyone who logs on
- Prev by Date: Re: Change number of Files Shown in 'My Recent Documents'
- Next by Date: Re: Copying files from one server to another?
- Previous by thread: Re: Scheduled Task for anyone who logs on
- Next by thread: runtime error when printing from toolbar
- Index(es):
Relevant Pages
|
Loading