Windows Scripting
  Home arrow Windows Scripting arrow System Properties, Startup, and Shutdown
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 
Dedicated Servers 
Moblin 
JMSL Numerical Library 
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

System Properties, Startup, and Shutdown
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 3
    2007-01-11

    Table of Contents:
  • System Properties, Startup, and Shutdown
  • 6.2 Automatically Setting the Time on a PC Not Connected to a Domain
  • 6.3 Changing the System Name
  • 6.4 Create a Multiboot Menu

  • 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


    System Properties, Startup, and Shutdown


    (Page 1 of 4 )

    If you've ever tried to do something simple with your PC and been annoyed at the hoops you've had to jump through, this article can help. The first of a four-part series, it shows you how to take control of starting up, shutting down, and setting the properties of your system. It is excerpted from chapter six of the Windows XP Cookbook, written by Robbie Allen, Preston Gralla (O'Reilly; ISBN: 0596007256). Copyright © 2005 O'Reilly Media, Inc. All rights reserved. Used with permission from the publisher. Available from booksellers or direct from O'Reilly Media.

     6.0   Introduction

    Starting up and shutting down a PC should be easy. Press a button and it turns on; click a few buttons and it turns off. The same holds true for your PC’s system properties. There should be nothing complicated about doing things such as setting the system time or giving your computer a name.

    But in computing, as in life, things are not always simple. And so things can get difficult and complicated. What if you sometimes want to start up your PC with debugging turned on, for example, or using safe mode, or using an entirely different operating system? What if you want to hunt down and kill programs and services that cause system conflicts? What if you want to change your boot screen or customize your system sounds?

    You’ll find recipes for doing all that and more in this chapter, so that you can take control of startup, shutdown, and setting your system’s properties. For information about troubleshooting startup problems, turn to Chapter 20, Crashes and Errors.

    6.1   Automatically Setting the Time on a Domain-Connected PC

    Problem

    You’re on a PC connected to a domain, and you want the PC to have its clock set to the proper time automatically, without your intervention.

    Solution

    Using a graphical user interface

    1. At the Run box, type services.msc and press Enter. This will run the services management module.
    2. Scroll down to the Windows Time entry and double-click on it.
    3. From the Startup type drop-down box, choose Automatic, as shown in Figure 6-1. Click OK. From now on, your PC will automatically synchronize its time with the domain controller every time the PC starts. (Note: This setting is turned on by default, but there is a chance that it has been turned off on your system, so it’s a good idea to double-check.)


      Figure 6-1.  If you're connected to a domain, the Windows Time service will automatically connect to a domain controller to synchronize its clock

    Using a command-line interface

    At the command line, type net start w32time and press Enter. That will start the Windows Time service. To stop the service, at the command line typenet stop w32timeand press Enter. That will stop the Windows Time service. When you use the command line to start the Windows Time service, the service only runs for that single session. If you want the service to start every time you start XP you can use the service’s management module, or you can use the sc.exe utility (runsc /configfor more information).

    Discussion

    Only computers running Windows XP Professional can connect to domains, so XP Professional has Windows Time service, while the XP Home Edition does not. By default, the Windows Time service runs automatically on Windows XP Professional computers.

    Time synchronization takes place with the Windows Time service during system startup. During startup, the Net Logon service looks for a domain controller that can synchronize time with the PC. It follows the Active Directory hierarchy. When the service finds a domain controller, it sends a request for time and waits for a reply. The communication is an exchange of SNTP packets that calculates the time offset and the roundtrip delay between the two computers.

    You can also use the Registry to synchronize a PC’s time with a domain controller on stsartup. Open the Registry Editor, and go to the keyHKEY_LOCAL_MACHINE\SYSTEM\ CurrentControlSet\Services\W32Time\Parameters. Create a REG_SZ value calledTypeand give it the valueNt5DS. That will tell the computer to synchronize its time with a domain controller on startup. If you give it the valueNoSync, it will tell the computer not to synchronize its time with a domain controller.

    See Also

    For more details about using the Windows Time service, see http://www.microsoft. com/technet/ prodtechnol/winxppro/maintain/xpmanaged/27_xpwts. mspx. For more information about using the Registry and the Windows Time service, see http:// www.winguides.com/registry/display.php/1118.

    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, Preston Gralla (O'Reilly; ISBN: 0596007256). Check it out today at your favorite bookstore. Buy this book now.

    WINDOWS SCRIPTING ARTICLES

    - Screen Capturing via GDI+ and GDI
    - Understanding Procedures in VBScript
    - Printing Documents in WSH
    - Generating Outlook Signatures Based on Activ...
    - VBScript: Converting and Formatting with Fun...
    - VBScript: Conversion and Format Functions
    - VBScript: Array Functions
    - VBScript: Strings, You Can`t Function withou...
    - VBScript: More String Functions
    - VBScript: Functioning with Strings
    - Working with the Windows Registry in C++
    - Understanding Objects
    - HTML Applications: Giving WSH a User Interfa...
    - Modifying Computer Objects with Active Direc...
    - Logon Script to Send Email Notifications





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway