|
|
#1 |
|
Junior Member
Join Date: Jul 2010
Posts: 9
|
Cancel / Revert changes when DLL is locked
Hi,
I want to cancel the deinstaller when a DLL file is still openend by another app, like IE. How can I detect this? I used the following code: code: but this only works when INSTALLING, not deinstalling. Also I'd like to revert changes when an error occured and the user clicked "cancel". Is this possible? I searched the forum, but the only solution I came up with so far is the above makro, which doesn't work when removing the file. |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
Take a look at the LockedList plugin.
|
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jul 2010
Posts: 9
|
Yes, I already found out about this one, and it seems to work fine :-)
But thanks for the tipp ![]() The only thing I'm not sure how to do now is to do a revert. Let's say installation fails at 67%, reasons unknown. The user presses Cancel, but the already installed files and registry keys are not removed. Is there a built-in solution? |
|
|
|
|
|
#4 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
There is no built-in solution. There are however some header files that can help with semi-automated deletion of installed files:
http://nsis.sourceforge.net/Uninstal...nstalled_files http://nsis.sourceforge.net/Advanced...og_NSIS_Header I've never used them myself, so I can't help you there. Personally, I prefer doing everything myself, at least that way I know exactly what's going on. What I do is create the uninstaller as the first step in the installation process. That way I can rollback installation even if it fails halfway. (My uninstallers only remove what I know I installed myself, like every good uninstaller should.) |
|
|
|
|
|
#5 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|