Windows 7 Administrator's Pocket Consultant, by William Stanek, series editor of our Administrator’s Pocket Consultant series, is now available. The book provides 704 pages of easily accessible details related to the daily administration of Windows 7; its ISBN is 9780735626997.
William is a Microsoft MVP with more than 20 years of experience in systems management and advanced programming. He is an award-winning author who’s written more than 100 books, including Windows Server 2008 Inside Out.
In this post you’ll find the book’s Introduction and an excerpt from Chapter 9, “Installing and Maintaining Programs.”
First the Intro:
Introduction
Writing Windows 7 Administrator’s Pocket Consultant was a lot of fun—and alot of work. As I set out to write this book, my initial goals were to determinehow Windows 7 was different from Windows Vista and Windows XP and what newadministration options were available. As with any new operating system—butespecially with Windows 7—I had to do a great deal of research and a lot of digginginto the operating system internals to determine exactly how things work.
When you start working with Windows 7, you’ll see at once that the operatingsystem is different from earlier releases of Windows. What won’t be apparent, however,is just how different Windows 7 is from its predecessors—and that’s becausemany of the most significant changes to the operating system are below the surface.These changes affect the underlying architecture, as well as the user interfaces, andthey were some of the hardest for me to research and write about.
Because Administrator’s Pocket Consultants are meant to be portable and readable—the kind of book you use to solve problems and get the job done whereveryou might be—I had to carefully review my research to make sure I focused on thecore aspects of Windows 7 administration. The result is the book you hold in yourhands, which I hope you’ll agree is one of the best practical, portable guides toWindows 7. Toward that end, the book covers everything you need to perform thecore administrative tasks for computers running Windows 7.
Because my focus is on giving you maximum value in a pocket-size guide, youdon’t have to wade through hundreds of pages of extraneous information to findwhat you’re looking for. Instead, you’ll find exactly what you need to address a specificissue or perform a particular task. In short, the book is designed to be the oneresource you turn to whenever you have questions regarding Windows 7 administration.It zeroes in on daily administration procedures, frequently used tasks,documented examples, and options that are representative while not necessarilyinclusive.
One of the goals for this book is to keep its content concise so that it remainscompact and easy to navigate while at the same time packing it with as much informationas possible to make it a valuable resource. Instead of a hefty 1,000-pagetome or a lightweight, 100-page quick reference, you get a valuable resource guidethat can help you quickly and easily perform common tasks, solve problems, andimplement everyday solutions for systems and users.
Who Is This Book For?
Windows 7 Administrator’s Pocket Consultant covers all editions of Windows 7. Thebook is designed for:
To pack in as much information as possible, I had to assume that you have basicnetworking skills and a basic understanding of Windows operating systems. As aresult, I don’t devote entire chapters to understanding Windows basics, Windowsarchitecture, or Windows networks. I do, however, cover desktop customization,mobile networking, TCP/IP configuration, user profiles, and system optimization.
The book also goes into depth on troubleshooting, and I’ve tried to ensure thateach chapter, where appropriate, has troubleshooting guidelines and discussions toaccompany the main text. From the start, troubleshooting advice is integrated intothe book—instead of being captured in a single, catchall troubleshooting chapterinserted as an afterthought. I hope that after you read these chapters and dig intothe details, you’ll be able to improve the overall experience of your users and reducedowntime.
How Is This Book Organized?
Windows 7 Administrator’s Pocket Consultant is designed to be used in daily administration,and as such, the book is organized by job-related tasks rather than byWindows 7 features. The books in the Administrator’s Pocket Consultant series aredown-and-dirty, in-the-trenches books.
Speed and ease of reference are essential elements of this hands-on guide. Thebook has an expanded table of contents and an extensive index for finding answersto problems quickly. Many other quick reference features have been added as well.These features include step-by-step instructions, lists, tables with fast facts, andextensive cross-references.
Conventions Used in This Book
I’ve used a variety of elements to help keep the text clear and easy to follow. You’llfind code listings in monospace type, except when I tell you to actually type acommand. In that case, the command appears in bold type. When I introduce anddefine a new term, I put it in italics.
Other conventions include the following:
Note To provide additional details about a particular point that needs emphasis
Tip To offer helpful hints or additional information
Caution To warn you when there are potential problems you should look out for
Real World To provide real-world advice when discussing advanced topics
I truly hope you find that Windows 7 Administrator’s Pocket Consultant provideseverything you need to perform the essential administrative tasks on Windows 7systems as quickly and efficiently as possible. You are welcome to send yourthoughts to me at williamstanek@aol.com. Thank you.
And here’s the opening of Chapter 9:
Chapter 9
Installing and Maintaining Programs
Managing Application Virtualization and Run Levels 311Installing Programs: The Essentials 318Deploying Applications Through Group Policy 322Configuring Program Compatibility 324Managing Installed and Running Programs 328
Administrators and support staff often install and configure applications thatare used on desktop computers. You need to install and configure applicationsbefore deploying new computers, install new applications on computerswhen the programs are requested, and update applications when new versionsbecome available. Also, as users install additional applications, you might be calledon to help troubleshoot installation problems or to help uninstall programs. Mostprogram installation problems are fairly easy to solve if you know what to lookfor. Other problems are fairly difficult to resolve and require more work than youmight expect. In this chapter, you’ll learn how User Account Control (UAC) affectshow you install and run applications and about techniques for installing, uninstalling,and maintaining programs.
Managing Application Virtualization and Run Levels
User Account Control (UAC) changes the way that applications are installed andrun, where applications write data, and what permissions applications have. Inthis section, I’ll look at how UAC affects application installation, from applicationsecurity tokens to file and registry virtualization to run levels. This information isessential when you are installing and maintaining applications on Windows 7.
Application Access Tokens and Location Virtualization
All applications used with Windows 7 are divided into two general categories:
The distinction between UAC-compliant applications and legacy applicationsis important because of the architectural changes required to support UAC.UAC-compliant applications use UAC to reduce the attack surface of the operatingsystem. They do this by preventing unauthorized programs from installing orrunning without the user’s consent and by restricting the default privileges grantedto applications. These measures make it harder for malicious software to take over acomputer.
Note The Windows 7 component responsible for UAC is the Application Informationservice. This service facilitates the running of interactive applications with an“administrator” access token. You can see the difference between the administratoruser and standard user access tokens by opening two Command Prompt windows,running one with elevation (right-click, and then click Run As Administrator), andthe other as a standard user. In each window, type whoami /all and compare theresults. Both access tokens have the same security identifiers (SIDs), but the elevated,administrator user access token will have more privileges than the standard useraccess token.
All applications that run on Windows 7 derive their security context from thecurrent user’s access token. By default, UAC turns all users into standard users evenif they are members of the Administrators group. If an administrator user consentsto the use of her administrator privileges, a new access token is created for the user.It contains all the user’s privileges, and this access token—rather than the user’sstandard access token—is used to start an application or process.
In Windows 7, most applications can run using a standard user access token.Whether applications need to run with standard or administrator privileges dependson the actions the application performs. Applications that require administratorprivileges, referred to as administrator user applications, differ from applicationsthat require standard user privileges, referred to as standard user applications, in thefollowing ways:
Applications not written for Windows 7 run with a user’s standard access tokenby default. To support the UAC architecture, these applications run in a special compatibilitymode and use file system and registry virtualization to provide “virtualized”views of file and registry locations. When an application attempts to write to asystem location, Windows 7 gives the application a private copy of the file or registryvalue. Any changes are then written to the private copy, and this private copy isthen stored in the user’s profile data. If the application attempts to read or write tothis system location again, it is given the private copy from the user’s profile to workwith. By default, if an error occurs when the application is working with virtualizeddata, the error notification and logging information show the virtualized locationrather than the actual location that the application was trying to work with.
Application Integrity and Run Levels
The focus on standard user and administrator privileges also changes the generalpermissions required to install and run applications. In Windows XP and earlierversions of Windows, the Power Users group gave users specific administratorprivileges to perform basic system tasks when installing and running applications.Applications written for Windows 7 do not require the use of the Power Usersgroup. Windows 7 maintains it only for legacy application compatibility.
As part of UAC, Windows 7 by default detects application installations andprompts users for elevation to continue the installation. Installation packages forUAC-compliant applications use application manifests that contain run-level designationsto help track required privileges. Application manifests define the application’sprivileges as one of the following:
To protect application processes, Windows 7 labels them with integrity levelsranging from high to low. Applications that modify system data, such as DiskManagement, are considered high integrity. Applications performing tasks thatcould compromise the operating system, such as Windows Internet Explorer 8 inWindows 7, are considered low integrity. Applications with lower integrity levelscannot modify data in applications with higher integrity levels.
Windows 7 identifies the publisher of any application that attempts to run withan administrator’s full access token. Then, depending on that publisher, Windows 7marks the application as belonging to one of the following three categories:
To help you quickly identify the potential security risk of installing or running theapplication, a color-coded elevation prompt displays a particular message dependingon the category to which the application belongs:
Prompting on the secure desktop can be used to further secure the elevationprocess. The secure desktop safeguards the elevation process by preventing spoofingof the elevation prompt. The secure desktop is enabled by default in GroupPolicy, as discussed in the section “Optimizing User Account Control and AdminApproval Mode” in Chapter 5.
Setting Run Levels
By default, only applications running with a user’s administrator access token run inelevated mode. Sometimes, you’ll want an application running with a user’s standardaccess token to be in elevated mode. For example, you might want to start theCommand Prompt window in elevated mode so that you can perform administrationtasks.
In addition to application manifests (discussed in the previous section),Windows 7 provides two different ways to set the run level for applications:
To run an application once as an administrator, right-click the application’sshortcut or menu item, and then click Run As Administrator. If you are using astandard account and prompting is enabled, you are prompted for consent beforethe application is started. If you are using a standard user account and promptingis disabled, the application will fail to run. If you are using an administrator accountand prompting for consent is enabled, you are prompted for consent before theapplication is started.
Windows 7 also enables you to mark an application so that it always runs withadministrator privileges. This approach is useful for resolving compatibility issueswith legacy applications that require administrator privileges. It is also useful forUAC-compliant applications that normally run in standard mode but that you use toperform administration tasks. As examples, consider the following:
Note You cannot mark system applications or processes to always run withadministrator privileges. Only nonsystem applications and processes can be markedto always run at this level.
Real World The Windows Application Compatibility Toolkit (ACT) is a solutionfor administrators that requires no reprogramming of an application. ACT can helpyou resolve common compatibility problems. For example, some programs runonly on a specific operating system or when the user is an administrator. Using ACT,you can create a shim that responds to the application inquiry about the operatingsystem or user level with a True statement, which allows the application to run. ACTalso can help you create more in-depth solutions for applications that try to write toprotected areas of the operating system or use elevated privileges when they don’tneed to. ACT can be downloaded from the Microsoft Download Center (http://download.microsoft.com).
You can mark an application to always run as an administrator by following thesesteps:
1. On the Start menu, locate the program that you want to always run as anadministrator.2. Right-click the application’s shortcut, and then click Properties.3. In the Properties dialog box, click the Compatibility tab, shown in Figure 9-1.
4. Do one of the following:
Note If the Run This Program As An Administrator option is unavailable, it meansthat the application is blocked from always running at an elevated level, the applicationdoes not require administrator credentials to run, or you are not logged on asan administrator.
The application will now always run using an administrator access token. Keepin mind that if you are using a standard account and prompting is disabled, theapplication will fail to run.
Optimizing Virtualization and Installation Prompting for Elevation
With regard to applications, two areas of User Account Control can be customized:
In Group Policy, you can configure these features by using the AdministrativeTemplates policies for Computer Configuration under Windows Settings\SecuritySettings\Local Policies\Security Options. The security settings are as follows:
In a domain environment, you can use Active Directory–based Group Policy toapply the security configuration you want to a particular set of computers. You canalso configure these settings on a per-computer basis by using local security policy.To do this, follow these steps:
1. Click Start, point to All Programs, Administrative Tools, and then click LocalSecurity Policy. This starts the Local Security Policy console.2. In the console tree, under Security Settings, expand Local Policies, and thenselect Security Options.3. Double-click the setting you want to work with, make any necessary changes,and then click OK.
Installing Programs: The Essentials
Program installation is fairly straightforward. Not so straightforward are troubleshootingthe many things that can go wrong and fixing problems. To solve problemsthat might occur, you first need to understand the installation process. In manycases, the typical installation process starts when Autorun is triggered. Autorun inturn invokes a setup program. Once the setup program starts, the installation processcan begin. Part of the installation process involves checking the user’s credentialsto ensure that he or she has the appropriate privileges to install the programand prompting for consent if the user doesn’t. As part of installing a program,you might also need to make the program available to all or only some users on acomputer.
Occasionally, Windows might not be successful in detecting the required installationpermissions. This can occur if the installation manifest for the program has anembedded RequestedExecutionLevel setting that has a value set as RequireAdministrator.Because the RequestedExecutionLevel setting overrides what the installerdetects in Windows, the installation process fails any time you run the installer withstandard user permissions. To solve this problem, back out of the failed installationby exiting, canceling the installation, or taking another appropriate action. Next,locate the executable file for the installer. Right-click this file, and then click Run AsAdministrator to restart the installation process with administrator privileges.
Additionally, it is important to understand that in Windows 7 and WindowsServer 2008 Release 2, Application Control policies replace Software Restrictionpolicies. Software Restriction policies control the applications that users can installand run on Windows 2000, Windows XP, and Windows Vista. Application Controlpolicies control the applications that users can install and run on Windows 7 andWindows Server 2008 Release 2. Keep the following in mind:
We hope you find this book extremely helpful!
Are there any known errors/corrections for this book?
Not yet, Bert. When there are, you'll be able to find a KB Support article here: http://support.microsoft.com/search/?adv=1
How can I purchase a hard copy of this book?
Tama, see the options here: oreilly.com/.../9780735626997
I have Windows Vista Administrator's Pocket consultant. Is there any differance or can you configure it the same???