Previous | Table of Contents | Next |
Youll 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, lets step through the procedure to change the system startup options by following the steps presented here:
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.
Figure 12.2 Changing a Services startup values.
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? Its 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 |