0

My MSI built in WiX 3.7, installs a DLL in system32 folder. While uninstalling, all components are getting removed except the dll in system32 folder. I could see this DLL in SharedDLLs Registry entry [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs] and reference count set to 1.

This DLL is very specific to my application and no other application uses it. If I delete the DLL's registry entry (SharedDlls) and try to uninstall, the DLL is getting removed from system32 folder.

My primary requirement is when I try to uninstall, the DLL in system32 folder must also be removed. Can someone suggest how to achieve it?

If any flags in WiX code could prevent the entry of this DLL in sharedDlls [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs].

Yan Sklyarenko
  • 31,557
  • 24
  • 104
  • 139
user2482613
  • 77
  • 1
  • 6

1 Answers1

0

In wix, the component that installs your dll should have the attribute SharedDllRefCount="No", or just don't explicitly set the SharedDllRefCount attribute at all (default value is "No). After you build your MSI, double-check that the attribute column in the Component table for your dll's component doesn't have the 0x0008 bit set (msidbComponentAttributesSharedDllRefCount - http://msdn.microsoft.com/en-us/library/windows/desktop/aa368007(v=vs.85).aspx).

jbudreau
  • 1,287
  • 1
  • 10
  • 22