Академический Документы
Профессиональный Документы
Культура Документы
2010
Application Compatibility Toolkit 5.5
CREATING A CUSTOM CATEGORY AND SUB-CATEGORY 1. If ACT is not already running, click Start | All Programs | Microsoft Application Compatibility Toolkit 5.5 | Application Compatibility Manager 2. Click Analyze. 3. Select Computers from the Windows 7 Reports collection. Notice that there are already several entries in the database from computers that have already run a DCP package successfully and have dropped their log files for the ACT Log Processing Service to pickup. 4. Select Applications from the Windows 7 Reports collection. Notice that there are already several entries in the database from computers that have already run a DCP package successfully and have dropped their log files for the ACT Log Processing Service to pickup 5. Select a LOB application, right-click and select Categories. NOTE: You can multi-select applications as well. 6. 7. 8. 9. 10. 11. 12. In the Assign Categories dialog box, click Master Category List. Click Add on the Categories side and type Line of Business. Click Add on the SubCategories side and type Legal Department. Click OK. Repeat and create subcategories for Purchasing, and Finance. Click OK. Click OK to close Assign Categories.
ASSIGNING COMPUTERS TO CATEGORIES 1. This same technique can be used to assign computers to different categories. For example you may want to mark the systems that generate contain patient records as a special group. 2. As an exercise, try creating a custom category for MedicalRecords and add one of the existing computer systems to that category. Youll need to create at least one sub-category . 3. Later, within the Analyze section in the reports, you will be able to use these custom categories as special reports for further analysis, rationalization, and prioritization.
CREATE A CUSTOM APPLICATION SOLUTION 1. If ACT is not already running, click Start | All Programs | Microsoft Application Compatibility Toolkit 5.5 | Application Compatibility Manager. 2. Click Analyze. 3. Select Windows 7 Reports in the left hand navigation pane under Reports. 4. Click Applications. 5. Double-click Get Going with Tablet PC. 6. Select the Issues Tab and Double-click the issue you created earlier. 7. From the Actions menu, select Add Solution. 8. Type Fix Getting Started with Tablet PC in the Title box. 9. Type New Version Included with Microsoft 7 in the Solution Details box. 10. Click Save. 11. Close the Application dialog box
2. 3. 4. 5. 6. 7. 8. 9.
In the Administrator Rights Warning dialog box, click OK. In the StockViewer application, click Trends. Click OK to close the error. On the Tools menu, click Options. Click Continue to close the error. On the Help menu, click Check for Updates. Click Quit closing the error and the application. On the Program Compatibility Assistant, click Close.
Note : The Program Compatibility Assistant detects after a failure and applies an Application Fix. 10. On the Start Menu, in Start Search, type Regedit, and then press ENTER. 11. In Regedit navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows NT\Current Version\AppCompatFlags\Layers. 12. In the right pane, click the entry with the data value equal to ELEVATECREATEPROCESS. 13. On the Edit menu, click Delete. 14. In the Confirm Value Delete dialog box, click Yes. 15. Close Regedit. Note: This is the application fix that was just automatically applied. USING THE STANDARD USER ANALYZER TO IDENTIFY APPLICATION ERRORS AND APPLY FIXES. 1. On the desktop, start the Standard User Analyzer. 2. In the Standard User Analyzer application on the AppInfo tab, click the Browse. 3. In the Browse for Application dialog box, navigate to c:\Program Files\StockViewer\StockViewer.exe, and then click Open. 4. In Launch Options, Uncheck Elevate, and then click Launch. 5. Type as user .\administrator and use pass@word1 6. In the AppVerifier Logs warning dialog box, click Yes. 7. In the StockViewer application, click Trends. 8. Click OK to close the error. 9. On the Tools menu, click Options. 10. Click Continue to close the error. 11. On the Help menu, click Check for Updates. 12. Click Quit closing the error and the application. 13. In the Standard User Analyzerapplication, review the following tabs; Registry, Token, Name Space, Other Objects and Process. Note: The above tabs contain the application errors that the Standard User Analyzer detected while it was monitoring the StockViewer application. 14. On the Mitigation menu item, click Apply Mitigations. 15. On the Mitigate AppCompatIssues dialog box, click Apply. Repeat steps you done in part 1 to verify the mitigations have been applied. 16. On the desktop, start the Stock Viewer application. 17. In the StockViewer application, click Trends. 18. On the Tools menu, click Options. 19. Click OK to continue.
On the Help menu, click Check for Updates. Use Administrator and pass@word1 for authentication. Click OK closing the demo update process. Close the StockViewer Application. Close the Standard User AnalyzerApplication.
Note: Most of the functionality has been resolved with these fixes. You have discovered another issue with the Check for Updates functionality, which you will fix later on.
CREATING CUSTOM SHIMS TO APPLY APPLICATION FIXES: 1. 2. 3. 4. On the desktop right-click the Compatibility Administrator and click Run as administrator. In the left pane click Custom Databases and then click New Database(1) [Untitled_1]. On the toolbar, click Fix. In the Create new Application Fix wizard, on the Program information page, in name, type StockViewer, in Location, type c:\Program Files\StockViewer\StockViewer.exe, and then click Next. On Compatibility Modes page select None for Operating Systems Modes, and then click Next. On the Compatibility Fixes page, check ElevateCreateProcess, ForceAdminAccess, LocalMappedObject, VirtualizeHKCRLite, andthen click Next. On the Matching Information page click Finish. On the toolbar, click Save. In the Database Name dialog box, type StockViewerFixes, and then click OK. On the Save Database browse window, in filename, type c:\SDBShare\StockViewerFixes, and then click Save. In the left pane expand the Installed Databases node and click the AppCompat shim database. On the File menu, click Uninstall. Click OK to close the Un-install dialog box. In the left pane select the StockViewerFixes custom shim database. On the File menu, click Install. Click OK to close the Install dialog box. Repeat steps you done in part 1 to verify the mitigations have been applied. On the desktop, start the Stock Viewer application. In the StockViewer application, click Trends. On the Tools menu, click Options. Click OK to continue. On the Help menu, click Check for Updates. Use Administrator and P@sswordfor authentication. Click OK closing the demo update process. Close the StockViewer Application.
5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24.
Note: The flashing item in the taskbar is another issue, which will be resolved later in this lab. 7. In the Compatibility Administrator click the StockViewer custom shim database. 8. On the toolbar, click Fix. 9. On the Program information page, in name, type StockViewerUpdateOrders, in Location, type c:\Program Files\StockViewer\StockViewerUpdateOrders.exe, and then click Next. 10. On Compatibility Modes select None for Operating Systems Modes, and the click Next. 11. On the Application Fixes, check SpecificNonInstaller from the list, and the click Next. 12. On the Matching Information page click Finish. Note:SpecificNonInstaller is a shim that is ran after GenericInstaller, so it can remove any false positives. This will be used to test the application without elevation. 13. In the left pane click the StockViewerFixes custom shim database. 14. On the toolbar, click Fix. 15. On the Program information page, in name, type StockViewerControlPanel, in Location, type c:\Program Files\StockViewer\StockViewerControlPanel.exe, and then click Next. 16. On Compatibility Modes select None for Operating Systems Modes, and click Next. 17. On the Compatibility Fixes page, check RunAsAdmin from the list, and then click Next. 18. On the Matching Information page click Finish. 19. On the toolbar, click Save. 20. In the left pane click the StockViewerFixes custom shim database. 21. On the File menu, click Install, and then click OK. Note: The new database will simply over-write the existing database. since the existing database has been modified. 22. Repeat steps 1 8 to confirm that the application fixes have been successfully applied. Repeat steps you done in part 1 to verify the mitigations have been applied. 23. On the desktop, start the Stock Viewer application. 24. In the StockViewer application, click Trends.
25. 26. 27. 28. 29. 30. 31. 32. 33. 34.
On the Tools menu, click Options. Click OK to continue. On the Help menu, click Check for Updates. Use Administrator and P@sswordfor authentication. Click OK closing the demo update process. On the toolbar, click Orders. On the taskbar, click the new flashing entry. Use Administrator and P@sswordfor authentication. In the Order Update dialog box, click OK. Close the StockViewer application.
Note: You will experience an Access Denied error when attempting to run without elevation. The SpecificNonInstaller shim allowed us to test this application as a non-admin, and here it failed. One option would be to remove the SpecificNonInstaller shim, and instead apply the RunAsAdmin shim. However, it may still be possible to resolve the issue that requires elevation without requiring elevation.
Note : Correcting the HWND that the application passes to the ShellExecute(Ex) API, the UAC prompt knows which window to place the dialog in front of. Repeat steps from Run Level Specification exercise to recreate the SpecificNonInstaller shim for StockViewerUpdateOrders.exe. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. On the desktop, start the Stock Viewer application. On the toolbar, click Orders. On the taskbar, click the new flashing entry. In the Order Update dialog box, click OK. Close the StockViewer application. On the Start menu, click Control Panel, Appearance and Personalization, and then StockViewer Settings. On the Permission Denied Warning, click OK. Close the Control Panel. Close the StockViewer Options application. In the Compatibility Administrator click the StockViewer custom shim database. On the toolbar, click Save. In the left pane select the StockViewerFixes custom shim database. On the File menu, click Install, and then click OK.
ELIMINATING THE NEED FOR ELEVATION: 1. In the Compatibility Administrator click the StockViewer custom shim database. 2. On the toolbar, click Fix. 3. On the Program information page, in name, type StockViewerUpdateOrders, in Location, type c:\Program Files\StockViewer\StockViewerUpdateOrders.exe, and then click Next. 4. On Compatibility Modes select None for Operating Systems Modes, and the click Next. 5. On the Application Fixes, check SpecificNonInstaller from the list, and the click Next. 6. On the Matching Information page click Finish. 7. In the Compatibility Administrator, on the left pane, in Applications click StockViewerUpdateOrders. 8. In the right pane, click StockViewerUpdateOrders.exe. 9. On the Edit menu, click Modify, and then click Edit Application Fix. 10. On the Program Information page, click Next. 11. On the Compatibility Modes page, click Next. 12. On the Compatibility Fixes page, check RetryOpenSCManagerWithReadAccess from the list, and then click Next. 13. On the Matching Information page, click Finish. 14. On the toolbar, click Save. 15. In the left pane select the StockViewerFixes custom shim database. 16. On the File menu, click Install, and then click OK. 17. On the desktop, start the Stock Viewer application. 18. On the toolbar, click Orders. 19. Close the StockViewer application. Note: Correcting the HWND that the application passes to the ShellExecute(Ex) API, the UAC prompt knows which window to place the dialog in front of. ACT 5.5 - Step-by-step document
Virtual Registry
VirtualRegistry is a multi-purpose shim for simulating the existence of appropriate registry entries for legacy applications. It can be used to redirect registry keys to a separate area in the registry (typically to resolve issues where access is denied), or to return different values when an application is looking for a specific key (that may no longer exist) or a different version (when a version number is hard coded). FAKING APPLICATION VERSIONS: 1. 2. 3. 4. On the desktop, start the Stock Viewer application. On the toolbar, click Browse. In the Unable to Browse, click OK. Close the StockViewer application.
Note: The application is asserting that it requires IE6, and Windows 7 includes IE8. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. In the Compatibility Administrator, on the left pane, in Applications, click StockViewer. In the right hand pane, click StockViewer.exe. On the Edit menu, click Modify, and then click Edit Application Fix. On the Program Information page, click Next. On the Compatibility Modes page, click Next. On the Compatibility Fixes page, check VirtualRegistry from the list, and then click Parameters. In the Options for VirtualRegistry, type IE60 in the Command line, and then click OK. On the Compatibility Fixes page, click Next. On the Matching Information page, click Finish. On the toolbar, click Save. In the left pane select the StockViewerFixes custom shim database. On the File menu, click Install, and then click OK. Onthe desktop, start the Stock Viewer application. On the toolbar, click Browse. Close Internet Explorer.
CORRECT A HARDCODED PATH INSIDE THE STOCKVIEWER APPLICATION: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. On the desktop, start the Stock Viewer application. On the Options menu, click Save Preferences. On the Access Denied Error, click Quit. In the Compatibility Administrator, on the left pane, in Applications click StockViewer. In the right pane, click StockViewer.exe. On the Edit menu, click Modify, and then click Edit Application Fix. On the Program Information page, click Next. On the Compatibility Modes page, click Next. On Compatibility Fixes page, check the CorrectFilePaths from the list and then click Parameters. Note Include the quotes in the step below. In the Options for CorrectFilePaths, type c:\windows\downloaded program files\stockviewer.ini;%userappdata%\stockviewer.ini in the Command line, and then click OK. On the Compatibility Fixes page, click Next. On the Matching Information page, click Finish. On the toolbar, click Save. In the left pane select the StockViewerFixes custom shim database. On the File menu, click Install, and then click OK. On the desktop, start the Stock Viewer application. On the Options menu, click Save Preferences. On the Preferences Saved dialog box, click OK. On the Start Menu, in Start Search, type c:\users\users1.woodgrove\appdata\roaming, and then press ENTER to view the stockviewer.ini. Close Explorer. Close Stockviewer
11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21.
7. On Compatibility Modes page select None for Operating Systems Modes, and then click Next. 8. On Compatibility Fixes page, check the UIPIEnableStandardMsgs from the list and then click Parameters. Note : Spy++ provided the message ID as 0319. Note that this value is the hexadecimal value, while the UIPIEnableStandardMsgs shim requires an input in decimal notation. Using Windows Calculator in scientific mode, we can switch to Hex mode, enter 319, and then switch to Dec mode, which translates to a value of 793. This is what we will enter as the command line parameter. 9. In the Options for UIPIEnableStandardMsgs, type 793 in the Command line, and then click OK. 10. On the Compatibility Fixes page, click Next. 11. On the Matching Information page, click Finish. 12. On the toolbar, click Save. 13. In the left pane click the StockViewerFixes custom shim database. 14. On the File menu, click Install, and then click OK. 15. On the desktop, start the Stock Viewer application. 16. On the Help menu, click Check for Updates. 17. On the Update Check, click OK. 18. Close the StockViewer Application. Note: By using UIPIEnableStandardMsgs, we can enable delivery of this particular Windows Message to the elevated process.
In the Edit menu, click Modify, and then click Edit Application Fix. On the Program Information page, click Next. On the Compatibility Modes page, click Next. On Compatibility Fixes page, check the WRPMitigation from the list, and then click Next. On the Matching Information page, click Finish. On the toolbar, click Save. In the left pane select the StockViewerFixes custom shim database. On the File menu, click Install, and then click OK. On the desktop, start the Stock Viewer application. On the File menu, click Update Kernel. On the Kernel Updated dialog box, click OK.
Version Lies
A very common application compatibility issue is when an application attempts to check the version of the operating system, and then compares this version number to the minimum supported value using equality rather than greater than or equals. To mitigate this issue, we can simply lie about the version of the operating system. We saw something similar in VirtualRegistry, and we see the same thing when an application calls the GetVersion(Ex) API. The VersionLie shims return the value that earlier versions of Windows would return. LIE TO AN APPLICATION ABOUT ITS OPERATING SYSTEM VERSION: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. On the desktop, start the Stock Viewer application. On the Tools menu, click Show Me a Star. On the Unsupported Version Check Error, click OK. In the Compatibility Administrator click the StockViewer shim in the left pane. Close the Stock Viewer Application. On the toolbar, click Fix. On the Program information page, in name, type Star, in Location, type c:\program files\stockviewer\DWM Compositing Rendering Demo.exe, and then click Next. On Compatibility Modes select None for Operating Systems Modes, and click Next. In the Compatibility Fixes page, check WinXPSP2VersionLie from the list, and click Next. On the Matching Information page click Finish. On the toolbar, click Save. In the left pane select the StockViewerFixes custom shim database. On the File menu, click Install, and then click OK. On the desktop, start the Stock Viewer application. On the Tools menu, click Show Me a Star. Click the Star to close it. Close the Stock Viewer application.
5. From the Start Menu, right click on All Programs \ Accessories \ Command Prompt and select Run as Administrator. 6. Type: copy c:\SDBShare\*.* \\SERVER1\SDBshare\. 7. On the Administrator command prompt, type: c:\SDBShare\sdbinstscript.cmd. 8. On the desktop, start the Stock Viewer application. 9. Test the application in the way you have mitigated the issues. 10. In the Compatibility Administrator click the Installed Databases in the left pane. 11. The StockviewerFixes shims database is installed The Compatibility Administrator will provide a real-time view of the installed custom shim databases. You can right-click on any of these databases and uninstall them or you can uninstall them by using sdbinst -u.