Windows > Software Development for Windows Client Forums > Application Compatibility for Windows Development > Vista - Helpful Info/Tips for Test Case Issues (WER/WRP/VB6/WINDBG)
Ask a questionAsk a question
 

StickyVista - Helpful Info/Tips for Test Case Issues (WER/WRP/VB6/WINDBG)

  • Monday, July 09, 2007 6:28 PMBruce N. Baker - MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    GENERAL TEST CASE TIPS 

    WRP keys - Checking if a registry key is WRP Protected

    MSDN link to WRP Information

       http://msdn2.microsoft.com/en-us/library/Aa382503.aspx

     

    1. With REGEDIT

     

    A first step to some would be to check if the key is WRP Protected or not. To do that do the following:
    Right click on the key -> Click Permissions -> Full Control would be only for TrustedInstaller (users/groupname tab) then the key is WRP. This means only Trusted Installers get to make changes to the key.

     

    Trusted Installer is a service that hosts code for install, update, and un-install of OS components. The service is trusted by the system to check for all the prerequisites such as package authenticity, signing authority and dependencies before making system changes

     

    Keys that are WRP will show Trusted Installer with Full Control. SYSTEM, Administrators, and Users will have Read permissions only.

     
    2. VIA CODE
     
    Through code, use SfcIsKeyProtected <http://msdn2.microsoft.com/en-us/library/aa382537.aspx> or SfcIsFileProtected <http://msdn2.microsoft.com/en-us/library/aa382536.aspx> API. If a key is WRP, then the application installer should not install or modify the key.
     
    WRP Identifier tool
       A very useful tool from Bill Hall that can assist you in indentifying WRP keys in your log files.
           http://www.dthall.com/wrp.html
     
    TEST CASE DETAIL
     
    Windows Resource Protection (WRP) protects Windows read-only resources: specifically OS files, folders, and registry keys that are non-configurable by design. So you violate WRP whenever your app/installer:

    · Attempts to replace, modify, or delete OS files and/or registry keys that are protected by WRP.
    · Attempts to write new registry keys or values to protected registry keys
    · Attempts to write to protected resources.
     
    You can first filter out those with Severity="Error". However, not all these errors violate Windows Resource Protection (WRP). That is, all errors may not affect any protected locations (files/registry keys). The protected locations include Windows/System/Program Files locations and few Registry locations. You need to make sure that your application does not write/update the WRPs. You can confirm this from the file or registry location mentioned in the message in the AppVerifier log.
     
    MORE INFO
     
    More information about the WRP (Windows Resource Protection) can be found at these locations -
    v Windows Resource Protection - <http://msdn2.microsoft.com/en-us/library/aa382551.aspx>
    v Windows Resource Protection on Windows Vista -  <http://msdn2.microsoft.com/en-us/library/aa372868.aspx>
     
     
     
     

    Use WINDBG

      

       Use windbg to break into your code or to understand exactly where errors might be occuring when in load situation or you don't understand the app verifier error or have trouble debugging in design environment.

     

    VB6

     

       Many VB6 controls are not shipped and you must install them. See the list on the VB6 support page.

     

       MSComCtl.ocx - Get the latest version from 2004 (SP6)

     

     

    (WER) WINDOWS ERROR REPORTING

     

    Having Problems with Windows Error Reporting?

     http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1429&SiteID=1

     

    Here's an AWESOME post on WER info

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1773443&SiteID=1