Subscribe to Windows IT Pro

 

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

June 28, 2007 12:00 AM

Another Way to Ensure Flawless Automatic Shutdowns

Windows IT Pro
InstantDoc ID #96115
Rating: (1)

In the Reader to Reader article "Flawless Automatic Shutdown of Client Computers" (November 2006, InstantDoc ID 93262), Milos Puchta described a problem he was having with a batch file that was supposed to shut down Windows XP Professional machines running ALWIL Software's Avast! antivirus software. This software prevents users from logging off when there's a disk (e.g., CD-ROMs, USB flash disks) in one of the computer's removable disk drives. Milos discovered that sometimes users left for the day, leaving disks in those drives. As a result, the shutdown process failed and the computers were left on all night.

Milos solved the problem by using the Shutdown command in a batch file. Another solution is to use PsShutdown, a free command-line utility (http://www.microsoft.com/technet/sysinternals/utilities/psshutdown.mspx). You can configure each PC with the PsShutdown utility (copied locally through a logon script if needed) and use a scheduled job with the appropriate command-line switches. You can create a job file on one PC, then copy it to the other PCs. If you don't need to shut down a particular PC, you can delete the job file by using a logon script. PsShutdown doesn't require the computer's name (it assumes the local PC), so using this utility would save Milos time because he wouldn't have to configure batch files.

For remote machines, you can copy PsShutdown and the job file by using commands such as

Copy shutdown.job 
  \\labpc01\c$\windows\tasks
Copy psshutdown.exe \\labpc01\c$\windows\

To run these commands, you need administrative rights on the lab PC and there can't be any local firewalls.

Alternatively, Milos can schedule a job or use a Group Policy shutdown script to shut down the Avast! service prior to shutting down the XP Pro computers. (This is assuming you can't configure Avast! to ignore CD-ROMs or USB flash disks on shutdown.) Once again, this can be done remotely if needed. By shutting down the right service, it should stop the problem of machines not shutting down because CD-ROMs or USB flash disks were left in PCs.

—Edward Braiter

Related Content:

ARTICLE TOOLS

Comments
  • Carlos
    5 years ago
    Jul 19, 2007

    Very usefull tx

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

White Papers

Get your Windows 7 deployment off to the right start by implementing PC lockdown. A locked-down environment is easier and cheaper to support since users are less likely to make unnecessary changes to the core system configuration - read more here!

Essential Guides

Is your iSCSI "lossy"? The reality is that most off-the-shelf Ethernet hardware deployed for iSCSI can lose packets, resulting in slow performance or application downtime. Learn how to assess your current iSCSI infrastructure and engineer an advanced iSCSI SAN infrastructure.

Web Seminars

What's the best way to keep your network safe from malware? In this web seminar, security expert Greg Shields suggests an alternative method to the traditional blacklisting approach that is common with anti-virus and anti-malware solutions.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.