Shim Database to XML

Shim Database to XML

  • Comments 8

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

  • 1.0.0.0; Fri, 02 Nov 2007
    • Initial upload
    • Usage: sdb2xml sdb [-out report] [-base64 | -extract] [-?]
  • 1.0.1.0; 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] [-?]
  • 1.0.2.0; Mon, 28 Jan 2008
    • Encode the element name as a local name
    • Usage: sdb2xml sdb [-out report] [-base64 | -extract] [-?]
  • 1.0.3.0; 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 4 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.

Page 1 of 1 (8 items)