installer.nsi (2237B)
1 !include "MUI2.nsh" 2 3 Name "Medfall" 4 Outfile "MedfallInstaller.exe" 5 6 InstallDir "$PROGRAMFILES64\Medfall" 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\launch.exe 18 File release\elevate_for_update.exe 19 20 # Start menu shortcut 21 CreateDirectory "$SMPROGRAMS\Medfall" 22 CreateShortCut "$SMPROGRAMS\Medfall\Medfall.lnk" "$INSTDIR\launch.exe" 23 24 # Uninstaller 25 WriteUninstaller "$INSTDIR\uninstall.exe" 26 27 # Registry keys 28 SetRegView 64 29 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Medfall" "DisplayName" "Medfall" 30 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Medfall" "UninstallString" "$INSTDIR\uninstall.exe" 31 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Medfall" "DisplayIcon" "$INSTDIR\logo.ico" 32 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Medfall" "Publisher" "Medfall Yes Son" 33 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Medfall" "DisplayVersion" "0.0.0.0" 34 WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Medfall" "NoModify" 1 35 WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Medfall" "NoRepair" 1 36 37 SectionGetSize ${SectionInstall} $0 38 IntFmt $1 "0x%08X" $0 39 WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Medfall" "EstimatedSize" $1 40 SectionEnd 41 42 Section "Uninstall" 43 # Files 44 Delete "$INSTDIR\medfall.exe" 45 Delete "$INSTDIR\launch.exe" 46 Delete "$INSTDIR\launch.exe.old" 47 Delete "$INSTDIR\elevate_for_update.exe" 48 Delete "$INSTDIR\uninstall.exe" 49 Delete "$INSTDIR\version.txt" 50 Delete "$INSTDIR\manifest.txt" 51 52 Delete "$INSTDIR\LiberationSans-Regular.ttf" 53 54 RMDir /r "$INSTDIR\logs" 55 RMDir /r "$INSTDIR\models" 56 RMDir /r "$INSTDIR\shaders" 57 RMDir /r "$INSTDIR\terrains" 58 RMDir /r "$INSTDIR\update" 59 RMDir "$INSTDIR" 60 61 # Start menu shortcut 62 Delete "$SMPROGRAMS\Medfall\Medfall.lnk" 63 RMDir "$SMPROGRAMS\Medfall" 64 65 # Registry keys 66 SetRegView 64 67 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Medfall" 68 SectionEnd