uninstaller problems
Hi all,
I recently added a function to my installer to allow the user to select between a minimum database which is 200Mb or an extended database which is 900Mb. Before I always installed the extended one.
To do this I created an options file to allow the user to chose which database to install: -
;Read a value from an InstallOptions INI file
ReadINIStr $R0 "$PLUGINSDIR\database.ini" "Field 2" "State"
; Test to see which Database is to be installed
StrCmp $R0 "1" "" Extended
DetailPrint "Installing Minimum Database"
setOutPath "$INSTDIR\data\english"
File /r "C:\mindata\english\*.*" ; contains the minimal distributed tables
setOutPath "$INSTDIR\data\usa"
File /r "C:\mindata\usa\*.*" ; contains the minimal distributed tables
Goto Done
Extended:
DetailPrint "Installing Extended Database"
SetOutPath "$INSTDIR\data\english"
File /r "C:\fulldata\english\*.*" ; contains the extended tables
SetOutPath "$INSTDIR\data\usa"
File /r "C:\fulldata\usa\*.*"
Done:
This bit works ok. And it installs the database I select.
As part of the installation I also create an uninstaller: -
Section "Uninstall"
RMDir "$INSTDIR\j2re"
RMDir "$INSTDIR\Program Files"
RMDir "INSTDIR\data\english"
RMDir "INSTDIR\data\usa"
Delete "$INSTDIR\Uninstall.exe"
SectionEnd
However, when I run the installer program when it gets to the stage where the uninstaller is created, it pauses for a few minutes then I get an error "Error creating uninstall.exe"
When I try and run the uninstaller all it does is delete the Uninstall.exe, but non of the other files.
I never had this problem before I added the ability to chose the database, so i'm guessing that might have something to do with it.
Does anyone know why this might be happening?
Many Thanks,
Martin
P.S. I'm using NSIS 2.01