Windows IT Pro
Windows IT Library
  - Advertise        
Windows IT Pro Logo

  Home  |   Books  |   Chapters  |   Topics  |   Authors  |   Book Reviews  |   Whitepapers  |   About Us  |   Contact Us  |   ITTV  |   IT Jobs

search for  on    power search   help
 






Configuring Windows NT 4.0 with Control Panel
View the book table of contents
Author: Sean Daily
Published: February 1997
Copyright: 1997
Publisher: 29th Street Press
 


Services
In Windows NT 4.0, special types of applications can run as background tasks. These applications are known as services. Services are essentially programs that can run independently of a user logon, meaning that they start when Windows NT starts, before the user logon screen even appears. As a result, services are always available to the system and any running applications. They are also usually launched by Windows NT or other applications automatically, rather than manually by a user.

A Windows NT 4.0 service may provide support for any one of a number of system functions, including network-related features like the ability of the computer to function as a server or workstation, provide network print spooling, or use various APIs such as NetBIOS or DCOM (Network DDE). Still other services provide support for miscellaneous Windows NT features such as UPS communications support and the ability to automatically execute commands at specific times during the day.

Tip for MS-DOS Users: MS-DOS users may remember that DOS had special background tasks known as TSR (Terminate and Stay Resident) programs. TSRs are similar to Windows NT services in that they are always available to the system, but they differ in that Windows NT services have far greater multitasking, performance, and stability features.

Although a user does not have to log on to the system in order for a service to run, services themselves must log on to the system with a valid user account. The user account used by the service must have the privileges and user rights the service requires to perform its functions (i.e., be a member of the correct local groups and have the necessary user rights assigned to it). Normally, a special user account called LocalSystem (a.k.a. the System Account) is used for this purpose, but some services may require the use of other user accounts as well.

For More Information: For more information about user accounts, groups, and user rights, see “Managing Users and Groups with User Manager,” Chapter 8.

Windows NT 4.0 services are viewed and managed via the Control Panel’s Services applet (shown in Figure 5.57).

Special Note: You can also manage Windows NT services to some extent by using various NET commands, which may be issued at the Windows NT command prompt.

A default set of services was automatically set up and configured for you based on the installation choices you made during Windows NT Setup. Table 5.9 lists some commonly installed services and their functions in Windows NT 4.0 and earlier versions.

Depending on your configuration and the other software installed during Windows NT 4.0 Setup, additional services may also be present on your system (such as simple TCP/IP services or remote access-related services).

Installing Services
Although the Services applet lets you manage many aspects of Windows NT services, it doesn’t let you install or remove them. Services are installed and removed automatically as you enable or disable functions or features in Windows NT that require the services. Normally, the feature is added or removed in one of the other Control Panel applets. For example, network-related services (which account for a large number of Windows NT services) are installed and removed through the Add button in the Network applet’s Services tab. This window also shows a list of the network software currently installed on your computer. As network services are added or removed, their corresponding services in the Services applet are automatically installed or removed.

Other applets install different Windows NT services. For example, the UPS Service is enabled by activating the UPS feature through the Control Panel’s UPS applet.

Managing Services
The Services applet window also lets you stop, pause, or restart Windows NT services. Such actions may be necessary for any of a number of reasons: the service is no longer desired; it has stopped functioning properly and needs to be restarted; and so on.

Starting a service runs the service application and makes it available to other processes that require it; stopping a service terminates it and removes it from memory. Pausing a service is useful when you need to stop a service, but cannot do so immediately because there are users connected to it (e.g., the Server service). You can pause the service, wait until all users are disconnected, and then stop the service. When you pause a service, no other users can connect to it, but active users can finish their sessions. Windows NT also lets you restart a service after you’ve paused it. Table 5.10 provides a summary of these service-related actions and their functions.

To start, stop, pause, or continue services using the Services applet, follow these steps:
  1. Start the Services applet in the Control Panel window by double-clicking its icon.
  2. Click the name of the service you want to start, stop, or pause. The status column to the right of the service name informs you of the service’s current state (Started, Paused, or blank, which indicates the service is stopped/not running).
  3. Choose the button at right for the function you want to perform on the service: Start, Stop, or Pause. If you are starting a service and need to pass startup parameters to the service, enter those parameters in the Startup Parameters box at the bottom of the dialog box.
Special Note: You should enter two slashes for each slash character in a parameter string. Single slashes are interpreted as an Escape character, not a slash character, and will not be interpreted correctly.
  1. You will see a window containing an animated timer and a message that Windows NT is attempting to perform the selected operation on the service. If the operation is successful, the status column next to the service name will reflect the service’s new state.
Occasionally, Windows NT may not be able to perform an operation (stop, start, and so on) to a service because the service is no longer responding to the system. In these cases, Windows NT will notify you that the service did not respond to the given request. These situations sometimes require you to shut down and restart your system.

Managing Services at the Command Prompt
For those more comfortable with the use of the command line, Windows NT also lets you manage services using the Net.exe program from a Windows NT Command Prompt. The Net command requires another command-line argument after it such as Start, Stop, Pause or Continue, followed by the name of a service.

To start, stop, pause, or continue Windows NT services from a Windows NT command prompt, follow these steps:
  1. Start a Command Prompt session by choosing the Command Prompt shortcut from the Start Menu’s Programs sub-menu.
  2. At the command prompt (e.g., C:\Winnt>), type Net followed by one of the service commands (Start, Stop, Pause, or Continue), followed by the name of the service. If the service name is more than one word, be sure to enclose the name of the service in double quotation marks (“”). For example: Net Stop “Net Logon”.
Stopping the Server Service
When you use Windows NT on a network, stop network-related services only with great care: others may be using them. One service in particular that should be stopped only with caution is the Server service. The Server service controls (among other things) access to shared files on the Windows NT computer. Stopping this service immediately disconnects all connected users, and they may lose data.

If you have to stop the Server service, follow these steps:
  1. Start the Control Panel’s Services applet.
  2. Find the Server service in the Service column and click on its name.
  3. Choose the Pause button at right to pause the service. Windows NT presents a window with a message that it is attempting to pause the service. When this happens, the status of the Server service should change from “Started” to “Paused.” The Paused state prevents new users from establishing connections with your computer.
  4. Now, using whatever means you choose, notify all users connected to your computer system that you will be bringing down your computer system and that they should close all open files by a specified time. Depending on your environment, you might do this verbally, by e-mail, via the Windows NT Chat application, or by using the more immediate Net Send command. To send a message to all users in this manner, type Net Send * “<message>” where <message> is your message to users notifying them of the imminent shutdown (the asterisk character stands for all users).
Special Note: Windows NT users must have the Messenger service already enabled to receive a message sent via Net Send. Windows for Workgroups or Windows 95 users must have the WinPopup program running.

  1. When all users have disconnected, you may safely stop the paused Server service.
Note: Even though pausing the Server service prevents ordinary users from making new connections to the computer, users who are members of the Administrators group can continue to make connections if required.

Setting Service Startup Options
In addition to letting you start and stop services, Windows NT lets you control what state services should be in when Windows NT initially loads.

To set the startup state for a service, highlight the service name in the list of services and choose the Startup button at right. Three startup options are available for any service:
  • Automatic: The service is started automatically when Windows NT starts.
  • Manual: The service isn’t started at Windows NT startup, but on demand — when requested by a user, application, or dependent service.
  • Disabled: The service is disabled and cannot be started.
Special Note: Changing the startup state of a service doesn’t affect the service’s current operational state (i.e., setting the service to Disabled doesn’t stop the service). It affects only how the service will be handled the next time Windows NT starts. To change the operation state of a service, use the Start, Stop, Pause, and Continue actions discussed in the previous section.

Use the following steps to change the startup state for a Windows NT service:
  1. Run the Control Panel’s Services applet.
  2. In the Services dialog box, select the service whose startup state you wish to change by clicking its name.
  3. Choose the Startup button. This displays the Services dialog box (shown in Figure 5.58).
  4. In the Startup Type box, select the startup type (Automatic, Manual, or Disabled) for this service.
  5. If required, select a user account to use in logging on in the Log On As box. The default choice is normally the System Account, which uses the special Windows NT LocalSystem user account. If you want the service to provide a user interface to the currently logged-on user, check Allow Service to Interact with Desktop check box. If a regular Windows NT user account is chosen, the password for that account will have to be entered in the Password box and again in the Confirm Password box.
  6. When done, click the OK button.
Note: A user account that is used by a service must have previously been assigned the “Log On As a Service” right in User Manager. See “Managing Users and Groups with User Manager,” Chapter 8, for more information about User Manager, including how to assign user rights. The LocalSystem account (the default Windows NT service logon account) has already been assigned this right. This account is not displayed in User Manager because it is a special Windows NT user account specifically for use by the system.

Caution: Do not change the user account used by a service unless you have been specifically instructed to do so by the software’s documentation or a qualified technical support representative. If you do, the service may not start properly in the future.

Service Dependencies
Some services are dependent services, meaning that they rely on other services to load and function properly. The dependent services inform Windows NT of the services they depend on, so that Windows NT knows in what order it should load services. Dependent services are not loaded until after the services on which they depend. Some dependent services (and user applications) can automatically launch the services they depend on as they are needed.

An example of a dependent service is Windows NT’s Alerter service, which requires the Messenger service to issue an administrative alert to a particular computer or user. If the Messenger service isn’t in a Started state, the Alerter service will not function properly.

Hardware Profiles
A final option in the Services applet is the ability to enable or disable particular services in different hardware profiles you’ve defined on your Windows NT computer. This is handy when different hardware configurations for your computer (e.g., a laptop not connected to a networked docking station) require a different set of services. This option lets you enable and disable services in each hardware profile on a case-by-case basis.

To view and modify how a particular service is configured in the hardware profiles on your Windows NT computer, follow these steps:
  1. Highlight the service name by clicking its name in the Services dialog box.
  2. Choose the HW Profiles button. A window now appears for the selected service showing all of the currently defined hardware profiles on this computer and the service’s configuration in each profile (i.e., Enabled or Disabled).
  3. Change the configuration of this service with individual profiles by selecting the profile name in the display and then choosing either the Enable or Disable button. The status column reflects the current configuration for the service in each profile. Repeat this step for each of the profiles whose services you wish to enable or disable.
  4. When done, click the OK button.


Page: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14

next page



Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing