Skip to content
⌘ NSIS Forum Archive

Upgrade a DLL

2 posts

fabiochelly#

Upgrade a DLL

What options do I need to use to replace a registered DLL only if the one I want to install is newer?

When I use InstallLib with REBOOT_PROTECTED, it doesn't work at all. When the setup tries to replace the dll, the setup stops and I have to click on cancel.

Here is my code ($OUTDIR = $SYSDIR):
!insertmacro InstallLib REGDLL $0 REBOOT_PROTECTED "${LOCAL_PATH}\DLL\${FileName}" "$OUTDIR\${FileName}" "$OUTDIR" 
kichik#
If it's really protected, you can't replace it. There are some tricks available to unprotect files temporarily or permanently, but those shouldn't be used. If you really want to replace a protected file, you should use its official installer.