How to use SDBINST to install SDB fixes

Installation

SDB files (databases), which we’d call shims, can easily be installed with the following command

sdbinst -q path_to_sdbfile

-q means quiet mode and the prompts for confirmation are auto accepted.

Another parameter used during installations is -p, which will allow SDBs containing patches. Not that common, though.

 

Once installed, there will be an entry in Add/Remove Programs, with the name given to the fix in the ACT (Application Compatibility Toolkit).

 

 

Uninstall

In order to uninstall a  shim, sdbinst can be called with the following parameters

-q                     quiet mode, same as for the installation

-u File.sdb      this will remove the shim installed by the provided SDB file

or

-u {guid}         this will uninstall based on the guid

-n name          this will uninstall based on the internal name (the one

 

 

Known issues

See what issues might occur when using sdbinst in our related article.

 

SDBINST issues on Windows 7 and Windows 10

Possible Problems

When migrating packages Windows 7 (or older) to Windows 10, or when simply targeting multiple OS’s with the same package, one might to pay attention on the way SDBINST.exe is used for compatibility fixes (shims).
In case the executable is included in the package (simply as a file or in the binary table, inside an MSI), there could be issues like error exit codes of sdbinst, or worse, like an incorrect behaviour even though the SDB file would appear to be installed.

Long story short:

  • the SDBINST from Windows 7 will behave incorrectly on Windows 10 (shim/sdb will appear as installed but won’t do what it’s supposed to do)
  • the SDBINST.exe from Windows 10 will not work at all on Windows 7 (visible in the exit code)

 

Solution

Adapt the package so that SDBINST.exe is excluded from it and use the executable found on the system, whether it’s an Win7 or Win10 OS.

In case this is done inside an MSI via custom action, make sure to change it from “Execute from Installation” in Wise or “EXE – Stored in Binary Table/Installed with Product” in InstallShiled to “Execute from Destination” – Wise or “EXE – Path from Directory”. That will result in a custom action with type 3106 (0x0c22) if you’re executing in Deferred – System Context, Synchronous.

 

More info

For more info on sdbinst.exe and how to use it, check our other post about this topic.