I have couple of dll files that need to be registered/unregistered when a Windows installer is installed/uninstalled respectively.
I tried the following - Created a .bat file to register the dll. The issue is I am not able to add a .bat file using 'Custom Actions' in Setup Project.
Also, how to run unregister dll while uninstalling ? Please advice. Thanks.
By registering a DLL, you are adding information to a central directory (the Registry) for use by Windows. The information typically includes a "friendly name" for the component, which makes it easier to use from within another program, and the full path to the . dll or .
Step 1: First click on Start, then Run. Step 2: Now all you have to do to register a DLL file is to type in the regsvr32 command, followed by the path of the DLL file. Step 3: Now click OK and you should get a confirmation message that the DLL has been registered successfully.
Click Start > All Programs > Accessories and right-click on "Command Prompt" and select "Run as Administrator" OR in the Search box, type CMD and when cmd.exe appears in your results, right-click on cmd.exe and select "Run as administrator" At the command prompt, enter: REGSVR32 "PATH TO THE DLL FILE"
Below info is my registering DLL steps:
Now settings done.
After you install your project, you can find Common Files folder exists with DLL (like my path "C:\Program Files (x86)\Common Files")
You can find DLL key has been registered in your RegEdit too.
If you uninstall your project, those info will be removed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With