I want to use Inno Setup to create an installation file for a shell extension. The problem is if I want to reinstall or uninstall the shell extension the setup may fail if the DLL is loaded by Explorer and cannot be deleted.
The shell extension will be installed for current user only, which means I cannot rely on Inno Setup's restartreplace
or similar procedures that replace or delete DLL on reboot but require admin privileges.
(Old question:) The only idea I have is somehow running regsvr32 /u {app}\my_extension.dll
in both install and uninstall before the DLL is deleted. At least when run from prompt this command never fails to unload and unregister a DLL even if it is loaded by Explorer, which is why I would like to use it with Inno Setup. Is there a way to run the command?
Edit: Not even unregistering the DLL will get Explorer to release it. I still need to find another way to release the DLL so it can be deleted.