Uninstall Problem
I'm having the same problem as:
This Dude
When my uninstall runs, it gets rid of the registry entries and the uninstall file itself, but not the files or directory. I'm not entirely positive I'm doing it right (I created these files originally with NSIS Workbench and have modified them from there. Here's the basic gist:
;NSIS Script For Centre Web
;Backgound Colors
BGGradient 800080 000000 FFFFFF
BrandingText " "
;Title Of Your Application
Name "MyApp"
;Do A CRC Check
CRCCheck On
;Output File Name
OutFile "Install.exe"
;The Default Installation Directory
InstallDir "$PROGRAMFILES\MyApp"
;The text to prompt the user to enter a directory
DirText "Please select the folder below"
Section "Install"
;Install Files
SetOutPath $INSTDIR
SetCompress Auto
SetOverwrite IfNewer
File /r "D:\MyStageDir\*.*"
; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MyApp" "DisplayName" "MyApp (remove only)"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MyApp" "UninstallString" "$INSTDIR\Uninst.exe"
WriteUninstaller "Uninst.exe"
SectionEnd
Section "Shortcuts"
;Add Shortcuts
SectionEnd
UninstallText "This will uninstall MyApp from your system"
Section Uninstall
;Delete Files
Delete "$INSTDIR\*.*"
;Delete Uninstaller And Unistall Registry Entries
Delete "$INSTDIR\Uninst.exe"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\MyApp"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MyApp"
RMDir "$INSTDIR"
SectionEnd
;--------------------------------
;Installer Functions
Function .onInit
ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MyApp" "UninstallString"
StrCmp $R0 "" done
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
"MyApp is already installed. $\n$\nClick `OK` to remove the \
previous version or `Cancel` to cancel this upgrade." \
IDOK uninst
Abort
;Run the uninstaller
uninst:
ClearErrors
ExecWait '"$R0" _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
done:
FunctionEnd