Quantcast
PCWorld.com is upgrading some back-end systems. Some site features, such as user registration, may be temporarily unavailable.

Blogs

    Answer Line

  • From Windows to wireless, Contributing Editor Lincoln Spector finds solutions to readers' most vexing PC problems.
  • Subscribe to this blog

Answer Line: Which Background Programs Can I Close?

Lincoln Spector

One-Click Shutdowns

What is the command line for exiting Windows, and what are the benefits of command-line exits?

Marilee Lawrence, Fresno, California

Closing Windows with a DOS-style command line gives you all sorts of options for shutting down your computer. You can create an Exit Windows shortcut, for example, or set up a batch file that performs one or more maintenance chores--defragment your hard drive, back up your data, and so on--before shutting down your system.

For instructions on creating a shortcut, see Scott Dunn's January 2001 Windows Tips column. You may have to alter the specific command line, however, as Scott's instructions are a bit out of date.

If you want something fancier--say, a shortcut that will defrag your hard drive and then shut down--create a simple batch file: Select Start, Programs (or All Programs), Accessories, Notepad. What commands you actually enter in the batch file will depend on which version of Windows you use, but the first line should launch the defragging, and the second should shut down Windows. For defragging commands for the different Windows versions, see "Defrag Automatically" in my October 2002 column. Here are the various commands for shutting down Windows.

Windows 98 and Me: rundll.exe user.exe,exitwindows (no space after the comma)

Windows XP Home: shutdown -s

Windows 2000 and XP Pro: Neither OS has a dependable shutdown command, so I recommend BK-Soft's free Kill Win (see FIGURE 2). If you install Kill Win to its default C:\Killwin folder, then the command c:\killwin\killwin.exe /s will shut down Windows.

So, for example, if your PC is running Windows XP Home Edition, your shutdown batch file should read:

defrag c:

shutdown -s

Save this file in a convenient folder as defragnshutdown.bat. When you're ready to shut down, just use it like a shortcut.

Send your questions to answer@pcworld.com. We pay $50 for published items. Click the link for more Answer Line columns. You'll find Contributing Editor Lincoln Spector's humorous writing at The Link Inspector.

  • Recommend this story?
  • 0 Yes
    0 No
  • Great year-end deals
    for small business!
  • Get 24/7 live remote AT&T Tech Support 360* service along with select Lenovo* PCs (with Intel® Core™ 2 Duo processors) and save up to 200!

    Learn more

  • HP EliteBook* 6930p Notebook with Intel® vPro™ technology and a free HP Basic Docking Station - $641 instant savings!

    Learn more

Learn more about the Windows Phone PCWorld Gift Guide

Focus on Personal Productivitysponsored by Microsoft

  • Personal Finance 2.0 These free and fee-based Web services not only aggregate data from your online bank accounts, they give you tools for managing your money.
  • High-Tech Travel Tips Plenty of stories provide advice for elite mobile professionals. But what about you, the unproductive traveler?

People who read this also read:

Answer Line

All PC World Blogs

  • Perfect Printing Solutions Find just the right All-in-One printer for you from HP. Visit the HP Resource Center.
  • Lenovo Laptop Showcase Find out how Lenovo IdeaPads and Thinkpads balance performance and portability. Visit the Lenovo Resource Center for more info...

Sponsored Links