Windows Scripting
  Home arrow Windows Scripting arrow Page 4 - Taking Control of System Properties, Start...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WINDOWS SCRIPTING

Taking Control of System Properties, Startup, and Shutdown
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2007-02-01

    Table of Contents:
  • Taking Control of System Properties, Startup, and Shutdown
  • 6.14 Disabling Error Reporting
  • 6.15 Creating Environment Variables
  • 6.16 Creating a Reboot or Shutdown Shortcut
  • 6.17 Scheduling a Reboot
  • 6.18 Speeding Up System Startup

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Taking Control of System Properties, Startup, and Shutdown - 6.16 Creating a Reboot or Shutdown Shortcut


    (Page 4 of 6 )

    Problem

    You want to reboot or shut down your PC quickly, and customize the way that it shuts down.

    Solution

    Using a graphical user interface

    For a fast way to shut down or reboot your PC, create a shortcut on your desktop, and then double-click the shortcut.

    To create the shortcut, right-click the desktop and select New -> Shortcut. The Create Shortcut wizard appears. On the first screen, for the location of the item, typeshutdown, followed by one of several switches, like this:

      shutdown -r -t 01 -c "Rebooting your PC"

    Click Next, and in the next screen, type in the name of the shortcut. This is what will appear on the shortcut on the desktop. Then click Finish. To shut down or reboot, double-click the shortcut.

    The example above would create a shortcut that would reboot your PC after a one-second delay and display the message “Rebooting your PC.” You can instead tell the PC to reboot or you can have it log you off instead of shutting down. Table 6-3 lists the switches you can use withshutdown.

    Table 6-3. Switches you can use with shutdown

    Switch What it does
    -s Shuts down the PC
    -l Logs the current user off.
    -t nn Indicates the delay, in seconds, before performing the action.
    -c“messagetext” Displays a message in the System Shutdown window. A maximum of 127 characters can be used. The message must be enclosed in quotation marks.
    -f Forces any running applications to shut down.
    -r Restart the PC.

    More Windows Scripting Articles
    More By O'Reilly Media


       · This article is an excerpt from the book "Windows XP Cookbook," published by...
     

    Buy this book now. This article is excerpted from chapter six of the Windows XP Cookbook, written by Robbie Allen and Preston Gralla (O'Reilly; ISBN: 0596007256). Check it out today at your favorite bookstore. Buy this book now.

    WINDOWS SCRIPTING ARTICLES

    - Introducing Two-Way Data Binding using Silve...
    - Silverlight 2.0 Application Development with...
    - Burning Multisession CDs with IMAPI2 in WSH
    - Creating a Silverlight 2.0 Application that ...
    - Burning CDs with the IMAPI2 Control
    - Burning CDs in Windows XP with WSH
    - Advanced Word Object Scripting
    - Reading and Printing Word Documents in WSH
    - Scripting Microsoft Word
    - Using WSH to Catalog MP3 Files
    - Reading MP3 ID3 Tags in WSH
    - A Brief Look at Menus in WPF
    - More Examples of Simplified Image Processing...
    - Completing a WPF To-Do List Application
    - Simplified Image Processing in GDI+





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
    Stay green...Green IT