Installing a BHO with Wix
-
13-07-2021 - |
سؤال
i just finished my Browser Helper Object and Im currently writing an installer for it. so far i managed to get an MSI which copies the .dll to the desired location, but im not sure how i can register the object manually. Which keys do I need to set so that the Internet Explorer loads the BHO automatically?
المحلول
When use regsrv32
to register the DLL, it calls DllRegisterServer
in your DLL to perform the registration. So you have to add all the keys and values this function (DllRegisterServer
) writes to the registry to your MSI, so that MSI writes them for you during installation.
To unregister the DLL, you use regsrv32 /u
, in this case DllUnregisterServer
is called in the DLL. Usually it just removes the entries added in DllRegisterServer
.
Windows Installer will automatically remove all the added registry entries when it's uninstalled. Just check DllUnregisterServer
does not perform any other actions. If it does, implement it in WiX.