Previous Table of Contents Next


You’ll learn how to find out about service dependencies in a later section in this chapter, titled “Finding Service And Device Driver Information In The Registry.” For now, take my word for it that making changes to service startup values should only be performed if you fully understand the significance of your action. Having said all that, let’s step through the procedure to change the system startup options by following the steps presented here:

1.  Open the Control Panel Services applet.
2.  Select the service to control in the list box.
3.  Click the Startup button to display the Service dialog box, as shown in Figure 12.2.
4.  To change the startup method, select one of the following radio buttons in the Startup Type group:
  Automatic—To configure the service to start automatically at system startup.
  Manual—To configure the service to start when an operator manually starts the service.
  Disabled—To configure the service to not start under any circumstances.
5.  To specify the user account that provides the service’s base privilege, make one of the following selections in the Log On As group:
  System Account—Select this option (the default for any service) to specify that the service will use the local computer’s System account. This account generally has full rights to use any local resource. If you check the Allow Service To Interact With The Desktop checkbox, the service can provide a user interface to its functionality regardless of the logged on user’s access rights. This function is most often used by remote control programs, such as the System Management Server’s Remote Control Client, and it is only available if the service uses the local system account.
  This Account—Select this option to specify a user account and password to be used by the service when it starts. Once you have selected this option, click the button next to the This Account field to display the Add User dialog box to specify the user account to be used by the service. Then, enter a user account’s password in the Password and Confirm Password fields.


Note:  If you specify a user account using the This Account option, you must also configure the service to have the Log On As Service right. This can be accomplished by using the User Manager For Domains (or User Manager on a Windows NT Workstation or a Windows NT computer operating in server mode). Just choose User Rights from the Policies menu to display the User Rights Policy dialog box. Then, click the Show Advanced User Rights checkbox. Next, choose Log On As Service in the Rights drop-down list box. If the user account you will be using is not listed in the Grant To list box, click the Add button to grant the user account the right to log on as a service.
6.  Once you make your selections, click OK to close the Services dialog box.
7.  Repeat Steps 1 through 6 for each service you want to modify. When you are finished, click OK to close the Services applet.


Figure 12.2  Changing a Service’s startup values.

Managing Services From The Command Line

If you are not a GUI type of person and prefer using the command line to manage your services, you will be happy to know that Windows NT provides a command-line interface for service management. Not only is this good for those who dislike GUI applications, but it is good for all of us who would like to automate certain actions using batch files. I use batch files, for example, to create and delete user accounts, back up drives and service databases (such as Exchange Server or SQL Server), and even restart my computer. You might wonder why I use a batch file to restart my computer. The answer is twofold. First, the batch file shuts down my services gracefully. Not only do I know that each service had time to shut down properly, but some services (such as WINS) will make an automatic backup of their database each time they are shut down in this fashion. So, I consider this to be good insurance in case of a system failure. Secondly, when Windows NT attempts to shut down the services itself during a shutdown sequence, it takes longer to accomplish than a manual shutdown. It takes almost 20 minutes for an automatic shutdown versus 5 to 10 minutes for a manual shutdown. So, I consider using a batch file to restart my computer a time-saver.

You can use the command line to query certain services, perform specific actions, and, in some cases, configure a service, as well. You can also share these batch files with other users. Some of them might not be as technically proficient as you are. This would make it easier for them to accomplish the same actions or solve the same problems. Many users, for example, are unaware of the proper order to start or stop services. So, using a batch file to accomplish this task can be quite useful. And it all starts with one command. What is this magical command you ask? It’s the NET command. The basic syntax is shown in Listing 12.1.

Listing 12.1 Command line syntax for the NET command.

NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |
     HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |
     SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]


Previous Table of Contents Next