Any suggestions? Export (0) Print
Expand All

Custom Shim Database Deployment

Deploying a custom shim database to users requires the following two actions:

  • Placing the custom shim database (*.sdb file) in a location to which the user’s computer has access (either locally or on the network)

  • Calling the sdbinst.exe command-line utility to install the custom shim database locally

While any approach that completes these two actions will work, customers commonly use one of the following two approaches:

  • Packaging the *.sdb file and a script in an .msi file and then deploying the .msi file, making sure to mark the custom action not to impersonate the calling user. For example, if using Microsoft Visual Basic® Scripting Edition (VBScript) script, the custom action type would be msidbCustomActionTypeVBScript + msidbCustomActionTypeInScript + msidbCustomActionTypeNoImpersonate = 0x0006 + 0x0400 + 0x0800 = 0x0C06 = 3078 decimal.

  • Placing the *.sdb file on a network share, and then calling a script on target computers, making sure to call the script at a time when it will receive elevated rights (for example, from a computer start-up script instead of a user log-in script)

Note that you must ensure that the installation of the custom shim database executes with administrative rights.

This example script is taken from the custom action of a Windows Installer (MSI-based) installation of a custom shim database:


Function Install
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "sdbinst.exe -q " & CHR(34) & "%ProgramFiles%\MyOrganizationSDB\MyOrg.sdb" & CHR(34), 0, true
WshShell.Run "cmd.exe /c " & CHR(34) & "del " & CHR(34) & "%ProgramFiles%\MyOrganizationSDB\MyOrg.sdb" & CHR(34) & CHR(34), 0
WshShell.Run "reg.exe delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{guidFromMyOrgsSdb}.sdb /f", 0
End Function

Function UnInstall
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "sdbinst.exe -q -u -g {guidFromMyOrgsSdb}", 0
End Function

Initial deployment and updates

Because testing and mitigation of application compatibility issues typically happens prior to the deployment of Windows 7, a common approach is to include the custom shim database containing all known issues at the time of deployment with the corporate image. Then, as you need to update your custom shim database, you could provide these updates using one of the mechanisms described above. This is the methodology that Microsoft uses to manage the System shim database. The initial version was released with the Release to Manufacturing (RTM) version of Windows 7, and updates are provided with Windows Update. When you use this approach, you are using a methodology proven at a very large scale.

Community Additions

© 2015 Microsoft