installer.nsi (1992B)
1 !include "MUI2.nsh" 2 3 Name "Mud Gangster" 4 Outfile "MudGangsterInstaller.exe" 5 6 InstallDir "$PROGRAMFILES64\Mud Gangster" 7 RequestExecutionLevel admin 8 9 !insertmacro MUI_PAGE_DIRECTORY 10 !insertmacro MUI_PAGE_INSTFILES 11 !insertmacro MUI_UNPAGE_CONFIRM 12 !insertmacro MUI_UNPAGE_INSTFILES 13 14 Section "Install" SectionInstall 15 # Install stuff 16 SetOutPath $INSTDIR 17 File ..\release\mudgangster.exe 18 File licenses.txt 19 20 # Start menu shortcut 21 CreateDirectory "$SMPROGRAMS\Mud Gangster" 22 CreateShortCut "$SMPROGRAMS\Mud Gangster\Mud Gangster.lnk" "$INSTDIR\mudgangster.exe" 23 24 # Uninstaller 25 WriteUninstaller "$INSTDIR\uninstall.exe" 26 27 # Registry keys 28 SetRegView 64 29 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MudGangster" "DisplayName" "Mud Gangster" 30 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MudGangster" "UninstallString" "$INSTDIR\uninstall.exe" 31 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MudGangster" "DisplayIcon" "$INSTDIR\mudgangster.exe" 32 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MudGangster" "Publisher" "Hirve" 33 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MudGangster" "DisplayVersion" "0.0.0.0" 34 WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MudGangster" "NoModify" 1 35 WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MudGangster" "NoRepair" 1 36 37 SectionGetSize ${SectionInstall} $0 38 IntFmt $1 "0x%08X" $0 39 WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MudGangster" "EstimatedSize" $1 40 SectionEnd 41 42 Section "Uninstall" 43 # Files 44 Delete "$INSTDIR\MudGangster.exe" 45 Delete "$INSTDIR\licenses.txt" 46 Delete "$INSTDIR\uninstall.exe" 47 RMDir "$INSTDIR" 48 49 # Start menu shortcut 50 Delete "$SMPROGRAMS\Mud Gangster\Mud Gangster.lnk" 51 RMDir "$SMPROGRAMS\Mud Gangster" 52 53 # Registry keys 54 SetRegView 64 55 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MudGangster" 56 SectionEnd