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
- At the Run box, type services.msc and press Enter. This will run the services management module.
- Scroll down to the Windows Time entry and double-click on it.
- 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.
Next: 6.2 Automatically Setting the Time on a PC Not Connected to a Domain >>
More Windows Scripting Articles
More By O'Reilly Media
|
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.
|
|