3 ; Gmpc installation script for NSIS installer compiler
4 ; By: Daniel Lindenaar <daniel-gmpc@lindenaar.org>
6 ;--------------------------------
10 ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gmpc" "UninstallString"
11 StrCmp $R0 "" Gmpc_NOT_PRESENT
12 MessageBox MB_OK "Gmpc is already installed. Installation will be aborted."
19 ; The name of the installer
23 OutFile "gmpc_win32_installer.exe"
25 ; The default installation directory
26 InstallDir $PROGRAMFILES\gmpc
27 InstallDirRegKey HKLM "Software\gmpc" "InstallationDirectory"
28 ;--------------------------------
34 UninstPage uninstConfirm
36 ;--------------------------------
38 ; The stuff to install
40 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gmpc" "DisplayName" "Gmpc simulation tool"
41 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gmpc" "UninstallString" '"$INSTDIR\uninstall.exe"'
42 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gmpc" "NoModify" 1
43 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gmpc" "NoRepair" 1
45 ; Set output path to the installation directory.
52 SetOutPath $INSTDIR\data\glade
54 SetOutPath $INSTDIR\data\images
57 WriteRegStr HKLM "Software\gmpc" "InstallationDirectory" $INSTDIR
58 WriteUninstaller "$INSTDIR\Uninstall.exe"
60 SectionEnd ; end the section
64 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gmpc"
65 DeleteRegKey HKLM "Software\gmpc"