2006-09-15, 10:28 PM
Below is my simple plugin install script. It deploys the files fine. But the durn uninstal.exe doesn't really do anything when it's run. It displays the expected wizard dialogs, but under "Details," it just lists, "Complete."
No files are removed. No drectories are removed. And of course the uninstaller isn't removed.
I'd be eternally grateful if someone could look at this. I'm sure I'll be smacking my head and exclaiming, "Doh!" :-)
No files are removed. No drectories are removed. And of course the uninstaller isn't removed.
I'd be eternally grateful if someone could look at this. I'm sure I'll be smacking my head and exclaiming, "Doh!" :-)
Code:
; License page
!insertmacro MUI_PAGE_LICENSE "SleepTimer - README.txt" ;(This is your readme text or info to be displayed in this box)
; Directory page
;!insertmacro MUI_PAGE_DIRECTORY ;(remove semi-colon at begining of this line to allow user to choose directory)
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
;!insertmacro MUI_PAGE_FINISH ;(remove semi-colon at begining of this line to show Finished page instead of files installed as last page.)
; Language files
!insertmacro MUI_LANGUAGE "English"
; Reserve files
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
; MUI end ------
; The name of the installer
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
; The file to write
OutFile "SleepTimer_Setup.exe"
; The default installation directory
InstallDir "$PROGRAMFILES\devnz\gbpvr"
;Show file install details (hide|show|nevershow)
ShowInstDetails show
Section "MainSection" SEC01
ReadRegStr $INSTDIR HKLM "software\devnz" "GBPVR InstallDir" ; Find GB-PVR
DetailPrint "GBPVR is installed at: $INSTDIR"
SetOverwrite ifnewer ; overwrite files only if newer.
SetOutPath "$INSTDIR" ; Set output path to the installation directory.
writeUninstaller "$INSTDIR\plugins\[COLOR=black]uninstall[/COLOR].exe"
File "SleepTimer - README.txt" ; Your Readme file
File "D:\dev\gbpvr\Sleep Timer\bin\Release\CommonGBPVRUtilities.dll" ; Any common library files
File "D:\dev\gbpvr\Sleep Timer\bin\Release\GBPVRPublic.dll"
File "D:\dev\gbpvr\Sleep Timer\bin\Release\GbpvrUiElements.dll"
File "D:\dev\gbpvr\Sleep Timer\bin\Release\System.Data.SQLite.dll"
SetOutPath "$INSTDIR\plugins" ; Set output path to the plugins directory.
File "D:\dev\gbpvr\Sleep Timer\bin\Release\Sleep Timer.dll"
SetOutPath "$INSTDIR\Skin\Blue\SleepTimer" ; Set output path to the skin directory.
File "D:\dev\gbpvr\Sleep Timer\release\SleepTimer\Program Files\devnz\gbpvr\Skin\Blue\SleepTimer\skin.xml"
SectionEnd
Section "[COLOR=black]uninstall[/COLOR]"
Delete "$INSTDIR\plugins\[COLOR=black]uninstall[/COLOR].exe" ; delete self (see explanation below why this works)
Delete "$INSTDIR\plugins\Sleep Timer.dll"
Delete "$INSTDIR\Skin\Blue\SleepTimer\skin.xml"
;RMDir "$INSTDIR\Skin\Blue\SleepTimer"
SectionEnd
Section -Post
SectionEnd
WinTV PVR-150 / ATI X1600 512 / 3GHz P4 / 2GB RAM