Welcome, Guest. Please login or register.
September 07, 2010, 03:04:30 AM
Home Help Login Register
News: NRD PC Remote Help is now available! See www.nrdpc.com for details!

+  NRD PC Forums
|-+  Ask Ned
| |-+  Software Tech Support
| | |-+  Start-up Batch Files
« previous next »
Pages: [1] Print
Author Topic: Start-up Batch Files  (Read 1626 times)
jyeend
Guest
« on: October 12, 2007, 04:24:03 PM »

Is it possible to schedule a batch file that will log every workstation off at night?
Logged
Ned
Administrator
Hero Member
*****
Posts: 2131


View Profile
« Reply #1 on: October 13, 2007, 03:30:03 AM »

Assuming that you are logging users off from Windows Server, you don't need a batch file. You can set each user or a group of users with valid login hours, which will make Windows Server forcibly log them off at the appropriate hour.

Here's the Microsoft Support article with the rundown for Windows Server 2003:

http://support.microsoft.com/kb/816666

If you aren't using Windows server, it gets a little more complicated, but simply put you can use the built-in Task Scheduler program on the workstation to force it to logoff at a particular hour. Just open Scheduled Tasks in the Control Panel. Then on the menu bar, click File>New>Scheduled Task. Name the task Logoff or some such. Right click on the task and click Properties. In the Task tab, in the Run box, type in:

%systemroot%\System32\shutdown -l

Note that last letter is a lower-case L. Then click on the Schedule tab and change the values for "Schedule Task", "Start time" and "Schedule Task Daily" to whatever suits you (the last bit should be Every 1 day(s) to run every single day).  Click OK and you're done.

Now, you can do that for each individual workstation, or if they are all supposed to logoff at the same time, you can copy the Logoff task file from C:\Windows\Tasks and copy it to the same folder on the other workstations.
« Last Edit: October 13, 2007, 03:53:08 AM by Ned » Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!