PDA

View Full Version : Uninstallation doesn't remove files...


Tsury
11th February 2012, 11:06
Hi.

I have the following:

Section "Typical" SEC01
SetOutPath "$INSTDIR"
SetOverwrite on
File "C:\myfiles\file.dll"
SetOutPath "$APPDATA\myProg"
SetOverwrite on
File "C:\myfiles\file.dat"
SectionEnd



Section Uninstall
Delete /rebootok "$INSTDIR\file.dll"
Delete /rebootok "$APPDATA\myProg\file.dat"
SectionEnd


For some reason, file.dll is never deleted, not even after a reboot.
I have some other files like file.dat which are successfully deleted.
What am I doing wrong here?

(Using Win7 Enterprise x64).
Thanks.

Afrow UK
11th February 2012, 12:43
Check the value of $INSTDIR with a MessageBox.

Stu

MSG
11th February 2012, 13:16
In the uninstaller, $INSTDIR contains the folder where the uninstall.exe is stored. This is not necessarily the same as it was in the installer.

Tsury
11th February 2012, 13:17
In the uninstaller, $INSTDIR contains the folder where the uninstall.exe is stored. This is not necessarily the same as it was in the installer.

Thanks. That my issue.
I will probably use the registry to help me.