Skip to content
⌘ NSIS Forum Archive

NEWBIE: Cannot delete files on uninstall

2 posts

ir_fuel#

NEWBIE: Cannot delete files on uninstall

in the uninstall section i do this:

ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\MyCompany\Tools" "PhotoshopPath"

this key was written by the install and contains the path to the filters i installed (checked with regedit). Then lines below are:

Delete "$INSTDIR\MyUninst.exe"
Delete "$2\MyFilter.8bf"

When running the uninstall the MyFilter file is NOT deleted, and it does not show up in the log either as being deleted. The uninstall file IS deleted however.

Any ideas why?
Guest#edited
The reason is that the uninstall somehow cannot find or cannot delete the file. Check if the errorflag is set after deletion! And also check the path that is read from the registry (so display it in a messagebox just before deletion to know if it is the right one).

So there could be wrong several things, check them all.

[Edit]
BTW, try Delete /REBOOTOK because the file might be in use.
[/Edit]

Good luck,
-Hendri.