Shim Database to XML

Shim Database to XML

  • Comments 10

Extracts data as XML from a shim database used for application compatibility. Please leave feedback on the tool here on this page.

This was developed using what little public documentation is available on MSDN as well as some experimentation at other functions that were exported from apphelp.dll, such as SdbReadBYTETag() which I reasoned follows the same signature pattern as SdbReadDWORDTag().

Version History

  •; Fri, 02 Nov 2007
    • Initial upload
    • Usage: sdb2xml sdb [-out report] [-base64 | -extract] [-?]
  •; Sun, 04 Nov 2007
    • Get filename for extraction when available from shim database.
    • Corrected P/Invoke signatures based on debug observations.
    • Usage: sdb2xml sdb [-out report] [-base64 | -extract] [-?]
  •; Mon, 28 Jan 2008
    • Encode the element name as a local name
    • Usage: sdb2xml sdb [-out report] [-base64 | -extract] [-?]
  •; Tue, 29 Jan 2008
    • Fixed the displayed usage; actual usage was correct and is unchanged
    • Usage: sdb2xml sdb [-out report] [-base64 | -extract] [-?]
Attachment: sdb2xml.exe
Leave a Comment
  • Please add 8 and 5 and type the answer here:
  • Post
  • The Application Compatibility (AppCompat) platform in Windows is a powerful feature that allows for fixes

  • This was brought to my attention by a recent acquaintance : heaths dropped some bits on his blog that

  • This was brought to my attention by a recent acquaintance : heaths dropped some bits on his blog that

  • I get an error running this tool against some sdb's from a 64-bit system:

    C:\tmp\appPatch\live>sdb2xml msimain.sdb -out msimain.xml

    Error: Invalid name character in 'DATABASE_ID(GUID)'. The '(' character, hexadecimal value 0x28, can

    not be included in a name.

    Trying to figure out why .NET 1.1 compatibility shim is not working on my 64-bit Server 2003 machines...

  • JasonG, thanks for reporting the issue. Seems that the APIs in Win2K3 changed how some tags were output. I'm now passing all the tag names to XmlConvert.EncodeLocalName() which takes care of this problem.

    Interestingly, even on Vista tags like TAG_MSI_PACKAGE still show as MSI_PACKAGE, but on Win2K3 they display as MSI_x0020_PACKAGE which would decode as "MSI _PACKAGE". So expect different element names in some cases.

  • Thanks Heath, it works great now.  One other little nit is the actual -? output lists -base63 as the option instead of -base64.  I'm not sure if that was intentional or not,

    Thanks again

  • JasonG, thanks. I just noticed that on this page when I posted the previous fix. I didn't realize it was in the usage, too. Definitely a typo, but pretty dumb nevertheless. I'll get a new one uploaded soon.

  • Nice tool, help me fixed investigating a AppCompat related issue.

  • Hi,

    Is there any chance that this can be recompiled to use .NET Framework 4 so that I don't have to install .NET Framework 2.0/3.5 just to use this utility?

    I currently bundle this with some MSI installers that I create (that subsequently install a shim).  On Windows 8/8.1, .NET Framework 3.5 isn't installed by default, and I would like to avoid having to install this pre-requisite just to use sdb2xml.exe.



  • sdb2xml still works btw. I was able to dump appraiser.sdb from the Win 10 ADK. I am looking to compare a list of desktop apps from an sccm query and reconcile with the Windows 10 Application Compatibility list. Microsoft is very light in this department - telling customers that 97% of apps are compatible is weak. Even the Compat Center is down or links are tired.

Page 1 of 1 (10 items)