Tài liệu Windows 7 Resource Kit- P17 doc

50 706 4
Tài liệu Windows 7 Resource Kit- P17 doc

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Understanding Services CHAPTER 17 753 Managing Services Windows provides four main tools for managing services: n The Services snap-in (Services.msc) n Task Manager n Group Policy n The Sc.exe command Managing Services Using the Services Snap-in The Services snap-in in Windows 7 is the same as in Windows Vista. Compared to this snap-in in Windows XP, the main difference is that the Startup value for a service can be configured as Automatic (Delayed Start) on the General tab of the properties sheet for the service (see Figure 17-11). FIGURE 17-11 Configuring a service for Delayed Start iMpoRtAnt Before configuring a service for Delayed Start, be sure that you understand the possible ramifications. Delayed Start does not provide any time guarantee for when a delayed service will start after the boot process finishes, and if a client application attempts to use the service before it starts, the client application may fail. This means that client applications should be designed to start up the service on demand if they need the service before the Delayed Start sequence starts it. In addition, if a particular service is configured for Delayed Start and SCM detects other services that depend on this service, SCM will ignore the Delayed Start setting on the service and will start it during the boot process. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. CHAPTER 17 Managing Devices and Services 754 The only other change from Windows XP is the option of enabling actions for stops with errors. This option can be configured on the Recovery tab, and configuring it enables detec- tion of and recovery from nonfatal errors. Managing Services Using Task Manager A Services tab was added to Task Manager in Windows Vista and is still available in Windows 7 (see Figure 17-12). This tab allows you to: n View the name, Process Identifier (PID), description (which is actually the service’s friendly name), status (running or stopped), and service group for all services running on the system. n Stop or start a service by right-clicking it and then selecting the appropriate option. n View the process within which a service is running by right-clicking the service and then selecting Go To Process. FIGURE 17-12 The Services tab in Task Manager note To view the process associated with a service, you should first click the Show Processes From All Users button on the Processes tab. This is a necessary step because many services run within an SvcHost.exe process to reduce the memory footprint that would result if each service ran separately. After processes for all users are displayed on the Processes tab, right-click a service that has a PID number on the Services tab and then select Go To Process. The focus will switch to the Processes tab and highlight the SvcHost.exe process used to host that particular service. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Understanding Services CHAPTER 17 755 Managing Services Using Group Policy You can use Group Policy to configure the startup state (Automatic, Manual, or Disabled) and ACLs for services in the same way that you do this on previous versions of Windows. A policy setting for each system service on a computer can be found under the following node: Computer Configuration\Policies\Windows Settings\Security Settings\System Services Managing Services Using the Sc.exe Command You can use the Sc.exe command to start, stop, configure, and manage various aspects of services in the same way that you can on earlier versions of Windows. The Sc.exe command provides administrators with far more flexibility in configuring services than the Services snap-in or Group Policy. The Sc.exe command was previously enhanced in Windows Vista with additional command-line switches, including the following: n New switches for specifying required privileges for a service, including: • privs Sets the required privileges for a service • qprivs Queries for the required privileges of a service n New switches that support per-service SIDs, including: • sidtype Changes a service’s SID • qsidtype Retrieves the setting for a service’s SID n New switches to enable configuration of the FailureActionsOnNonCrashFailures setting, including: • failureflag Changes the setting of the FailureActionsOnNonCrashFailures flag • qfailureflag Retrieves the setting for the FailureActionsOnNonCrashFailures flag • showsid Displays the service SID string corresponding to an arbitrary name • stop This is an old setting that was enhanced in Windows Vista to specify the stop reason. This setting enables postmortem reliability analysis to find an administra- tor’s reasons (by examining the event logged by SCM with the stop reason) for stopping a service. New in Windows 7 are command options for Sc.exe that allow configuring and querying a service for supported triggers. For information about how to use these new command options, see the sidebar titled “Direct from the Source: Sc.exe Command Support for Service Triggers” later in this chapter. For more information about the command-line switches for Sc.exe, type sc /? at a command prompt. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. CHAPTER 17 Managing Devices and Services 756 diReCt FRoM tHe SoURCe Sc.exe Command Support for Service Triggers CSS Global Technical Readiness (GTR) Team T he Sc.exe command-line tool has been updated for Windows 7 and Windows Server 2008 R2 to include the triggerinfo command option for configuring a service for supported triggers and the qtriggerinfo command option for querying the trigger information for a service. The syntax for the triggerinfo option is as follows. sc <server> triggerinfo [service name] <parameter1> <parameter2> Possible parameters for the -triggerinfo command option are as follows: n start/device/UUID/HwId1/… Starts the service on arrival of the specified device interface class UUID string with one or more hardware ID strings and/or compatible ID strings. n start/custom/UUID/data0/… Starts the service on arrival of an event from the specified custom ETW provider UUID string with one or more binary data items in hexadecimal string format, such as ABCDABCD to set 4-byte data. n stop/custom/UUID/data0/… Stops the service on arrival of an event from the specified custom ETW provider UUID string with one or more binary data items in hexadecimal string format, such as ABCDABCD to set 4-byte data. n start/strcustom/UUID/data0/… Starts the service on arrival of an event from the specified custom ETW provider UUID string with one or more optional string data items. n stop/strcustom/UUID/data0/… Stops the service on arrival of an event from the specified custom ETW provider UUID string with one or more optional string data items. n start/networkon Starts the service on first IP address. n stop/networkoff Stops the service on zero IP addresses. n start/domainjoin Starts the service if a domain member. n stop/domainleave Stops the service if not a domain member. n start/portopen/parameter Starts the service on the opening of a network port. The parameter is of the semicolon-delimited form portnumber;protocol name;imagepath;servicename. n stop/portclose/parameter Stops the service on the closing of a network port. The parameter is of the semicolon-delimited form portnumber;protocol name;imagepath;servicename. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Understanding Services CHAPTER 17 757 n start/machinepolicy Starts the service when machine group policy changes or is present at boot. n start/userpolicy Starts the service when user group policy changes or is present at boot. n delete Deletes the existing trigger parameters. Using the sc -qtriggerinfo command and the Windows Time (W32Time) service as an example, you can see that this service is configured to start when the system is joined to a domain and stop when the system is not joined to a domain. C:\Windows\system32>sc qtriggerinfo w32time [SC] QueryServiceConfig2 SUCCESS SERVICE_NAME: w32time START SERVICE DOMAIN JOINED STATUS: 1ce20aba-9851-4421-9430-1ddeb766e809 [DOMAIN JOINED] STOP SERVICE DOMAIN JOINED STATUS: ddaf516e-58c2-4866-9574-c3b615d42ea1 [NOT DOMAIN JOINED] For all services that specify trigger actions, a TriggerInfo subkey is created in the registry in the service configuration key, which is located at: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<Service Name> The TriggerInfo registry key for the Windows Time service is shown here. The first trigger is assigned a subkey of 0, selected in the image above. The 0 subkey for the Windows Time service indicates the Start trigger action. The second trigger action is assigned a subkey of 1. For the Windows Time service, the second trigger is used for the Stop trigger action. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. CHAPTER 17 Managing Devices and Services 758 The following values are contained within the TriggerInfo subkey(s): n Value Name: Action Value Type: REG_DWORD Description: Specifies the action to take when triggered: • 0x00000001 = Service Start • 0x00000002 = Service Stop n Value Name: GUID Value Type: REG_BINARY! Description: A GUID may be specified if it applies to the trigger type. For a device arrival trigger, the interface class GUID would be specified. For an ETW event trigger, the ETW provider GUID would be specified. n Value Name: Type Value Type: REG_DWORD Description: Specifies the type of trigger: • 0x00000001 = Device arrival trigger • 0x00000002 = IP address trigger • 0x00000003 = Domain join trigger • 0x00000020 = Custom trigger Note that for Trigger Start services, the Start value should be 0x00000003 to specify the Demand-Start Startup Type. Also, the Startup Type for Demand-Start services is listed as Manual in the Services MMC console. Summary Windows 7 provides an improved device installation experience for users that always searches Windows Update for the latest compatible drivers when a device is connected to the computer. The new Devices And Printers folder and Device Stage make it easier than ever for users to install, configure, and use both wired and wireless devices. Windows 7 also includes significant improvements in energy efficiency that increase battery life for mobile computers and can help businesses reduce their electric bills. Finally, Windows 7 includes support for Trigger Start of services to reduce the memory footprint, reduce the attack surface, and increase the boot- and run-time performance of Windows computers. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Additional Resources CHAPTER 17 759 Additional Resources These resources contain additional information and tools related to this chapter. Related Information n “Device Management and Installation” found at http://technet.microsoft.com/en-us /library/cc766437.aspx. n “Power Management in Windows 7 Overview” found at http://technet.microsoft.com /en-us/library/dd744300.aspx. n “What's New in Service Accounts” found at http://technet.microsoft.com/en-us/library /dd367859.aspx. n “What's New in Services” found at http://msdn.microsoft.com/en-us/library /dd405528.aspx. n “Service Accounts Step-by-Step Guide” found at http://technet.microsoft.com/en-us /library/dd548356.aspx. n “Windows Logo'd Products List updated for Windows 7” found at http://winqual.microsoft.com/HCL/Default.aspx. n “Windows Logo Program” found at http://www.microsoft.com/whdc/winlogo /default.mspx. n “Microsoft Hardware Support for Windows 7” found at http://www.microsoft.com /hardware/windows7/support.mspx. n Device Management and Installation Step-by-Step Guide: “Controlling Device Driver Installation and Usage with Group Policy” found at http://technet.microsoft.com/en-us /library/cc731387.aspx. n Device Management and Installation Step-by-Step Guide: “Signing and Staging Device Drivers in Windows Vista and Windows Server 2008” found at http://technet.microsoft.com/en-us/library/cc754052.aspx. n Device Management and Installation Operations Guide found at http://technet.microsoft.com/en-us/library/cc753759.aspx. n “Overview of Device and Driver Installation” (from the Windows Driver Kit) found at http://msdn.microsoft.com/en-us/library/ms791091.aspx. n “Device and Driver Technologies” (from the Windows Driver Kit) found at http://msdn.microsoft.com/en-us/library/aa972913.aspx. n “Device Identification Strings” (from the Windows Driver Kit) found at http://msdn.microsoft.com/en-us/library/ms791083.aspx. n “How Setup Ranks Drivers (Windows Vista and Later)” found at http://msdn.microsoft.com/en-us/library/aa477022.aspx. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. CHAPTER 17 Managing Devices and Services 760 On the Companion Media n AcceptPause.ps1 n AutoServicesNotRunning.ps1 n ChangMmodeThenStart.ps1 n ChangeServiceAccountLogon.ps1 n CheckServiceThenStart.ps1 n CheckServiceAThenStop.ps1 n CountRunningServices.ps1 n EvaluateServices.ps1 n FindPortableDeviceEvents.ps1 n GetMultipleServices.ps1 n GetServiceStatus.ps1 n MonitorService.ps1 n ServiceDependencies.ps1 n StartMultipleServices.ps1 n StopMultipleServices.ps1 Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. 761 CHAPTER 18 Managing Printing n Enhancements to Printing in Windows 7 761 n How Printing Works in Windows 7 765 n Understanding the Print Management Console 772 n Managing Printers Using Print Management 782 n Client-Side Management of Printers 792 n Managing Client-Side Printer Experience Using Group Policy 800 n Deploying Printers Using Group Policy 806 n Migrating Print Servers 812 n Monitoring and Troubleshooting Printers 816 n Summary 818 n Additional Resources 818 P revious to the introduction of the Windows 7 operating system, the Windows Vista operating system included enhanced capabilities for printing to provide high-fidelity print output, better print performance, improved manageability of printers and print servers, integrated support for XML Paper Specification (XPS), and the Windows Color System (WCS), which provides a richer color-printing experience. The Windows 7 operating system builds on these earlier printing improvements by adding Location-Aware Printing, printer driver isolation, configurable default spooler security settings, and an improved Point and Print experience for users. This chapter describes the printing capabilities of Windows 7 and how to manage printers in enterprise environments. Enhancements to Printing in Windows 7 The printing subsystem in Windows 7 and Windows Server 2008 R2 builds on the print- ing improvements made previously in Windows Vista and Windows Server 2008, so we will discuss the improvements that were introduced in the earlier versions of the operat- ing systems in the next section, followed by a section that describes the new printing features that have now been added in Windows 7. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. CHAPTER 18 Managing Printing 762 Printing Enhancements Previously Introduced in Windows Vista A number of print subsystem, print management, and printing experience improvements were first introduced in Windows Vista, and these continue to be included in Windows 7. The new features and enhancements to printing in Windows Vista were as follows: n Integrated support for XPS Windows Vista includes support for XPS, which is a set of conventions for using Extensible Markup Language (XML) to describe the content and appearance of paginated documents. n XPS print path In addition to supporting the Graphics Device Interface (GDI) print path used by earlier versions of Windows, the printing architecture of Windows Vista includes a print path that uses XPS as a document format, a Windows spool file format, and a page description language (PDL) for printers. n XPS document graphics fidelity and performance The XPS document printing capability in Windows Vista supports vector-based graphics that can be scaled to a high degree without creating jagged or pixilated text, producing high-fidelity print output for graphics-rich documents. An XPS document is created by default when you print from any application running on Windows Vista, and you can print this document without rendering it again to an XPS-capable printer. Therefore, you can reduce print processing time by as much as 90 percent compared with printing in previous versions of Windows, depending on the richness of the content being printed and the capabili- ties of the printer. n Microsoft XPS Document Writer Windows Vista includes the Microsoft XPS Docu- ment Writer, which you can use through any Windows application to print graphics- rich application output as XPS documents. You can then view these documents in Windows Internet Explorer by using the Microsoft XPS Viewer or by printing them directly to an XPS-capable printer without rendering them again. n Client-Side Rendering (CSR) By default, Windows Vista renders print jobs on the client instead of the print server. This can significantly reduce print processing times when printing to XPS-capable printers. CSR works on non-XPS printers as well and is useful for reducing CPU and memory load on the server (servers can host more queues); it also reduces network traffic for some drivers. n Resource Reuse XPS documents include the capability of rendering an image once and reusing the rendered image when it appears on multiple pages of a print job. This can reduce the print processing time for documents that have graphics-rich corporate logos and reduces the amount of data sent over the network to remote printers. n Windows Color System Windows Color System (WCS) works with the Windows Vista print subsystem to provide a richer color-printing experience that supports wide- gamut printers (inkjet printers that use more than four ink colors) for lifelike printing of color photos and graphics-rich documents. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [...]... versions of Windows prior to Windows Vista n Using the Add Printer Drivers Wizard from Print Management running on Windows Vista or later lets you add Type 3 (User Mode) printer drivers only for x86, x64, and Itanium systems running Windows Vista, Windows 7, Windows Server 2008, or Windows Server 2008 R2 To add additional drivers for earlier versions of Windows, use Print Management on Windows Server... servers onto a single server Additional Printing Enhancements in Windows 7 In addition to the previously listed printing improvements first introduced in Windows Vista, printing in Windows 7 and Windows Server 2008 R2 has now been enhanced in the following ways: n XPS printing system  The XPS printing system has been enhanced in Windows 7 and Windows Server 2008 R2 by the inclusion of a new rendering service... Print Management Console in Windows 7 later in this chapter n PrintBRM  The PrintBRM command-line tool has been enhanced in Windows 7 and Windows Server 2008 R2 to provide more flexibility and improved instrumentation for the administrator For more information concerning these improvements, see the sidebar titled “Direct from the Source: Enhancements to PrintBRM in Windows 7 and Windows Server 2008 R2”... is native to Windows Vista and later versions, allows users to open XPS documents in Internet Explorer 7. 0 or higher and to generate XPS documents from any Windows application using the Microsoft XPS Document Writer When you install additional features, some earlier versions of Windows can also use some of the capabilities of XPS: n By installing the NET Framework 3.0 redistributable on Windows XP Service... the document Beginning with Windows Vista, the printing subsystem still includes a GDI print path (for Type 3 – User Mode) to support printing to existing printers Kernel-mode GDI (Type 2 – Kernel Mode) drivers, however, are no longer supported Note  Type 3 (User Mode) means that the driver is compatible with Windows 2000, Windows XP, Windows Server 2003, Windows Server 2003 R2, Windows Vista, Windows. .. To take advantage of the new Print Management console features in Windows 7 and Windows Server 2008 R2, your computer should be running one of these versions of Windows On Windows Server 2008 R2, the Print Management console is available from Administrative Tools when you install the Print and Document Services server role On Windows 7, the Print Management console is available from Administrative Tools,... in this chapter Enhancements to Printing in Windows 7 Chapter 18 Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark 76 3 n n Installing printer drivers using Windows Update  The Add Printer Driver Wizard has been enhanced in Windows 7 and Windows Server 2008 R2 to enable downloading of additional printer drivers directly from the Windows Update Web site This change also means... each printer driver on your print server If a driver says Windows XP or Windows Server 2003 (that is, Type 3 drivers), the associated printer will be compatible with Windows 7 and Windows Vista If the driver says Windows NT 4.0 (Type 2), however, the printer uses a Kernel Mode driver and you will need an update for the driver before Windows 7 clients can use that printer Configuring Printer Driver... the Microsoft XPS Essentials Pack and Microsoft Core XML Services 6.0 on Microsoft Windows 2000, Windows XP, or Windows Server 2003, users can open XPS documents in a stand-alone XPS Viewer application How Printing Works in Windows 7 Chapter 18 Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark 76 5 Note  You can download these additional features from the Microsoft Download... built into Windows Vista and later versions for maximum application compatibility when printing from different kinds of applications to either legacy or XPS-capable printers How Printing Works in Windows 7 Chapter 18 Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark 76 7 Win32 Application using GDI graphics Windows Presentation Foundation Application Spooling Functions Windows . compatible with Windows 2000, Windows XP, Windows Server 2003, Windows Server 2003 R2, Windows Vista, Windows Server 2008, Windows 7, and Windows Server. of Windows 7 and how to manage printers in enterprise environments. Enhancements to Printing in Windows 7 The printing subsystem in Windows 7 and Windows

Ngày đăng: 26/01/2014, 10:20

Từ khóa liên quan

Mục lục

  • Cover

    • Copyright Page

    • Contents at a Glance

    • Table of Contents

    • Acknowledgments

    • Introduction

    • Part I: Overview

      • Chapter 1: Overview of Windows 7 Improvements

        • Windows 7 Improvements by Chapter

          • User Interactions

          • Performance

          • Mobility

          • Reliability and Supportability

          • Troubleshooting

          • Deployment

          • Windows 7 Editions

            • Windows 7 Starter

            • Windows 7 Home Basic

            • Windows 7 Home Premium

            • Windows 7 Professional

            • Windows 7 Enterprise

            • Windows 7 Ultimate

            • Choosing Software and Hardware

              • Windows 7 Software Logo

              • Hardware Requirements

              • Summary

Tài liệu cùng người dùng

Tài liệu liên quan