From the Compatibility Administrator window, click the Search

Một phần của tài liệu mcsa_pearson.mcsa.70-697.and.70-698.cert.guide.configuring.windows.devices (Trang 954 - 967)

Step 2. Click the Browse button and select the directory to search.

Step 3. Select at least one of the search options: Entries with Compatibility Fixes, Entries with Compatibility Modes, and/or Entries with AppHelp.

Step 4. Click the Find Now button to start the search. Any results will show up in the lower window, as shown in Figure 18-13.

Step 5. Click the Export button to save your search results to a text file. You can also double-click one of the files to view details of the fix from the

database.

Figure 18-13. Compatibility Administrator Allowing You to Search for Fixes for Applications Installed on the Local Computer

A lot of fixes are included with the ACT. These fixes are small pieces of code that capture API calls and translate them to current Windows API calls so that the application works the same way it did on older versions. You can search for applications with fixes using the Compatibility Administrator.

Expand the Applications node from the left pane to find the application by name. Select the application to view the fixes available, as shown in Figure 18-14.

Figure 18-14. Compatibility Administrator Allowing You to Find Existing Fixes Available for Many Applications

You can enable and disable any fix using the Administrator tool. It may be necessary to disable a fix; for example, if a vendor has released a new version of the application, you will need to disable the fix to test the application and confirm that the new version is correct. To disable a fix, select the application from the list in the left pane, click the Database menu, and then select

Disable Entry. You can enable a fix using the same procedure.

More details in the usage and configuration of ACT are beyond the scope of the 70-697 exam and are not included here.

Note

To learn more about using the tool to manage and create fixes, follow the references in the article “Managing Application-Compatibility Fixes and Custom Fix Database” at https://technet.microsoft.com/en-

us/itpro/windows/plan/managing-application-compatibility-fixes-and-custom- fix-databases?f=255&MSPPError=-2147217396.

Note

Most of the functionality available in previous version of the ACT has been

replaced with Upgrade Analytics, part of the Microsoft Operations Management Suite of tools. Learn more about the Upgrade Analytics solutions by following the links in the “SUA User’s Guide” at

https://technet.microsoft.com/en-us/itpro/windows/plan/sua-users-guide.

Using Windows Installer

Windows Installer is an application installer and configuration service that Microsoft has provided with Windows versions dating back to Windows XP and Windows Server 2003. It enables you to install, configure, update, and patch applications efficiently, thereby reducing total cost of ownership (TCO). Currently in version 5.0, Windows Installer running on a Windows 10 or Windows Server 2016 computer supports the installation of

applications on all versions of Windows, including approved apps on

Windows 10. Windows Installer offers a method of installing applications in a consistent manner. Using this method, a manufacturer can provide a way to package an application so that administrators can create scripted packages and deploy the application to Windows computers throughout a network.

Windows Installer enables administrators to deploy software so that it is always available to users and repairs itself if needed. The software is always available to a user, regardless of what happens. If a user's computer fails, a support person needs only to provide a replacement computer with Windows 10 installed. The user starts the computer and logs on, and the required

software packages are automatically installed. Should necessary files become corrupted or deleted, they are automatically reinstalled the next time the user requires the application.

Recent improvements in the functionality of Windows Installer include the following:

• Windows Installer 3.0 and later can install multiple patches with a single transaction that integrates the progress of installation, rollbacks, and reboots.

This includes that application of patches in a specified sequence.

• Windows Installer 4.5 and later can use transaction processing in installing

multiple packages. In other words, if the entire installation cannot complete successfully or is canceled by the user, Windows Installer rolls back changes and restores the computer to its original status. This ensures that all packages in a multipackage transaction are installed or none of them are installed.

• Windows Installer 5.0 can enumerate all components installed on the computer. In addition, packages can be used to customize the services on a computer. Developers can modify packages for installing an application according to per-user or per-computer scenarios.

• Windows Installer 5.0 enables administrators to author packages to secure new accounts, Windows services, files, folders, and Registry keys. You can use a security descriptor that specifies permissions denial or inheritance from a parent source, or specifies permissions of a new account.

Windows Installer uses the following file types:

• Application installation files use the .msi file extension. These are the basic files that install all programs.

• Transform files use the .mst extension. These files are created to

“transform,” or script, the way the installation takes place.

• Patch files use the .msp extension. These files apply hotfixes or other

patches that correct bugs or security problems with the associated application.

In an Active Directory Domain Services (AD DS) environment, Windows Installer takes advantage of Group Policy objects (GPOs) for deployment purposes. You can use a GPO to deploy applications in any of the following ways:

Publish a Package to Users: Provides users who receive this GPO with the

capability to install the application through the Control Panel Programs

applet. The application will also be installed when the user attempts to open a file whose extension is associated with the application.

Assign a Package to Users: Automatically provides the application within the Start screen of any computer that the user logs on to. The application installs upon the activation of the icon in the Start screen or when the user attempts to open a file whose extension is associated with the application.

Assign a Package to Computers: Installs the application automatically upon startup.

Caution

Never assign a Windows Installer Application to both a user and a computer.

If you do so, and the two GPOs use different transforms, the operating system will install and uninstall the application every time it is accessed.

When you right-click any .msi file, you see the options shown in Figure 18- 15 pertaining to file installation actions, as described in the list that follows.

Figure 18-15. Windows Installer Options Pertaining to Application Installation Actions

Install: The default. Installs the application using default parameters.

Repair: Attempts to repair an unsuccessful installation. Use this option when you've had a problem.

Uninstall: Use this option to remove the application, especially when the application installs improperly.

Troubleshoot Compatibility: Starts a wizard that enables you to test program compatibility settings before installing the program.

From the command line, you can use the Msiexec.exe file along with the .msi package name to install, uninstall, or repair the package, as well as to

advertise or create an installation package. (Advertising a program does not install it on a computer—it makes the application available for the user to install.) You can use any of the following actions with Msiexec.exe from a command prompt:

• To install an application, type msiexec /I filename.msi , where filename is the name of the application.

• To remove an application, type msiexec /X filename.msi.

• The repair parameters can assist when troubleshooting a Windows Installer problem. To repair the application, type msiexec /F [parameter]

filename.msi, where [parameter] refers to an option listed in Table 18-4 describing the repair action to be performed.

• To advertise an application, type msiexec /J [parameter] filename.msi.

There are two parameters for advertising: m advertises to all users on the computer, whereas u advertises only to the current user.

• Administrative installation packages are required for deploying applications from network shares. To create an administrative package for deployment, type msiexec /A filename.msi.

Table 18-4. Msiexec.exe Repair Parameters

Parameter Function Troubleshooting Usage

a Reinstalls all the files for the application

Use when the application does not completely install.

c Reinstalls any missing file or one whose checksum is invalid

Use when you receive file missing error messages.

d Reinstalls any missing file or an invalid version of a file

Use after installing a different application that overwrites shared files and you receive errors or experience problems.

e

Reinstalls any missing file, or an equal or older version of a file

Use when you have rolled back another application’s installation and then you receive error

messages.

m

Rewrites the Registry entries of the application that are attached to the computer

(HKEY_LOCAL_MACHINE)

Use when the application displays the same error for all users who use the computer.

o Reinstalls any missing file or an older version of a file

Use when you have rolled back another application’s installation and then you receive error

messages.

p Reinstalls any missing file Use when the application does not finish copying files.

Use when you use a Start screen

s Re-creates application shortcuts

or desktop icon and the

application does not open, but you can run the application from the command line or Run dialog box.

u

Rewrites the Registry entries of the applications that are attached to the user

(HKEY_USERS or

HKEY_CURRENT_USER)

Use when the application works for one user but does not work for another, even though they are using the same computer.

v

Caches a package locally (overwriting any existing cached package) and then runs the application from the source

Use when you install from a network location that is connected by a slow or

unpredictable network link, or when the application has failed during the file copy process. The v option should be used only for reinstall—do not use this option for the first installation.

Note

For additional parameters used with Msiexec.exe, open a command prompt and type msiexec /?. Also refer to "Command-Line Options" at

https://msdn.microsoft.com/en-us/library/aa367988.aspx.

The Windows Installer service runs on each computer and depends upon the Remote Procedure Call (RPC) service. The Windows Installer service, by default, does not start up automatically when you boot Windows 10. Instead, it starts up whenever an .msi package is run. The service works in

conjunction with the Msiexec.exe executable file, which interprets the

information in the .msi file.

Note

You can use Msiexec.exe to repair .msi packages. If you have trouble with an .msi package, you can run the Msiexec.exe file from the command line to repair the package. You can also use Msiexec.exe to control the installation process through its optional command-line switches, whether you run it from the command-line or use it in a script.

Understanding MSI Features and Support

Before Windows Installer standards were published for use by third-party manufacturers, each manufacturer developed a proprietary method of installation. These methods used different installation executables and

assorted parameters and had varying degrees of scripting capabilities. A few companies developed software that could create a standard installation

package, but they did not manage problems with files overwriting newer versions of the same file (the old DLL hell), and most had no method for rolling back versions nor provided a granular deployment method.

Windows Installer uses a standard set of installation rules. Compliant

applications must handle versioning rules to prevent overwriting newer files, maintain a record of any changes made to Windows—both file changes and Registry keys—and be capable of functioning with the Msiexec.exe file and Windows Installer service.

The .msi file acts as a relational database in which the fields in the file contain the instructions that can effectively deploy an application. When an installation begins, the Windows Installer service and Msiexec.exe

cooperatively convert the .msi data into an installation/uninstallation script.

A management application programming interface (API) is part of Windows Installer. This API tracks the installed applications, noting which features and components are selected and the path chosen by the installer. The API is able

to determine which component is not functioning properly and is able to

selectively reinstall the component, which avoids having to reinstall the entire application.

You can customize how an application is installed by creating a transform file, which has the extension of .mst. The transform file answers the questions that the installation process asks, such as the path for the application, the component selection, and other configuration options.

Note

For more information on Windows Installer, refer to "Windows Installer" at https://msdn.microsoft.com/en-

us/library/windows/desktop/cc185688(v=vs.85).aspx and links found in the document.

Implementing Shims

A shim is a minor system compatibility fix that assists in enabling

applications originally written for older Windows versions to work with a newer operating system such as Windows 10. Applications communicate with Windows by calling functions built in to the operating system via an internal structure called the Application Programming Interface (API). As the Windows operating system evolves from one version to the next (and even with updates to the same version), modification of these functions to suit all applications in use could limit the ability to improve Windows functionality or require considerable additional software code. This could lead to a

"bloated" operating system.

By using a shim, the import address table redirects application programming interface (API) calls to the shim, whose code implements modifications that enable the application to work properly with Windows 10. An example would be the redirection of application output to a user-specific folder rather than a general folder, thereby enabling you to configure a more restrictive access control list (ACL) than would be otherwise needed. You can also use

shims to locate system files that have been moved to a new location because of a change in Windows architecture; however, you cannot use a shim to circumvent built-in Windows security mechanisms.

Caution

You should regard shims as a temporary fix for your applications, to be used only until an updated version of the application becomes available.

Microsoft creates shims on a per-application basis and packages them in custom shim database files with the .sdb extension. You can install these files using the sdbinst.exe command-line tool, which is found in the

%systemroot%\system32 folder on a 32-bit computer and in the

%systemroot%\sysWOW64 folder on a 64-bit computer, as well as using the Compatibility Administrator, which you learned about earlier in this chapter.

Open an administrative command prompt and type the following:

Sdbinst filename.sdb [-?] [-q] [-u filepath] [-g GUID] [-n "name"]

In this command, the parameters are as follows:

filename.sdb: The path and name of the shim database you are installing

• [-?]: Displays help information

• [-q]: Quiet mode (automatically accepts prompts)

• [-u filepath]: Uninstalls the database specified by the file path

• [-g GUID]: Specifies the database to be installed using a GUID

• [-n "name"]: internal name of file (for uninstall only)

The workflow recommended by Microsoft for implementing shims includes the following steps:

Step 1. Create a new compatibility database (*.sdb) using the Compatibility

Administrator, which is a component of the Application Compatibility Toolkit (ACT).

Step 2. Select the application and then select the required compatibility fixes or shims.

Step 3. Test the application with the compatibility fix or shim.

Step 4. Save the compatibility database and deploy using the sdbinst.exe command.

Note

For more information on using shims, refer to "Managing Application-

Compatibility Fixes and Custom Fix Databases” and the references provided at https://technet.microsoft.com/en-us/itpro/windows/plan/managing-

application-compatibility-fixes-and-custom-fix-databases.

Configuring File Associations and Default Program Settings

By default, when you open a file with a known extension, Windows opens this file with an application known as the default program. For example, Windows opens image files with the new Windows 10 Photos app by default.

If you have more than one image viewer program installed on your computer, such as Irfan View, Breeze Browser, Adobe Bridge, or others including the older Windows Photo Viewer, you can choose which program opens the image by default when you double-click an image file with a given extension such as .jpg or .tif. Windows stores information in the Registry for all file types for which a default association has been defined or for which you have created a default program setting.

Modifying Default Program Settings

To modify default program settings or create new settings, use the following steps:

Step 1. Open Control Panel from the Start menu Windows System category and choose the Programs category.

Step 2. Click Default Programs to see the options shown in Figure 18-16.

Figure 18-16. Control Panel Programs Applet Enabling You to Set Default Programs or Associate File Types with the Desired Program

Step 3. Click Set Your Default Programs, and in the Set Your Default Programs window, select the program whose options you want to configure.

You receive the options shown in Figure 18-17.

Figure 18-17. Set Your Default Programs Window Enabling You to Select a Program That Will Act as the Default for All File Types and Protocols That It Can Open

Step 4. To use the selected program to open all file types and protocols it is capable of opening, click Set This Program as Default. To select from a list of file types and protocols, click Choose Defaults for This Program.

Step 5. The Set Associations for a Program window shown in Figure 18-18 provides a list of file types the chosen program can open. Select the file extensions you want to have the program open. To choose all file types, select the Select All check box. To remove file types, deselect their check boxes. When finished, click Save.

Figure 18-18. Selecting a Program as the Default for Its File Types

Step 6. You are returned to the Set Your Default Programs window. If

desired, select another program to modify its file associations. When finished, click OK to return to the Default Programs applet.

Associating File Extensions with Specific Programs

The Default Programs applet also lets you associate a file extension with a program. Use the following steps:

Một phần của tài liệu mcsa_pearson.mcsa.70-697.and.70-698.cert.guide.configuring.windows.devices (Trang 954 - 967)

Tải bản đầy đủ (PDF)

(1.305 trang)