Skip to content

Commit 92f530b

Browse files
committed
version in registry key for installer
1 parent 1a59be0 commit 92f530b

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

Diff for: mopper.nsi

+10-6
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ SetCompressor /SOLID lzma
4141

4242
!include "MUI.nsh"
4343

44-
!define VERSION "0.0.1"
44+
!define VERSIONMAJOR "1"
45+
!define VERSIONMINOR "0"
46+
!define VERSIONSERVICEPACK "0"
47+
!define VERSION "${VERSIONMAJOR}.${VERSIONMINOR}.${VERSIONSERVICEPACK}"
4548

4649
Name "Mopper ${VERSION}"
4750

@@ -178,12 +181,14 @@ Section
178181
File Release\mopper.exe
179182
File LICENSE.TXT
180183

181-
; Write the installation path into the registry so other tools can find the mopper
182-
WriteRegStr HKLM SOFTWARE\NifToolsMopper "Install_Dir" "$INSTDIR"
183-
184184
; Write the uninstall keys & uninstaller for Windows
185-
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NifToolsMopper" "DisplayName" "NifTools Mopper (remove only)"
185+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NifToolsMopper" "DisplayName" "Mopper (remove only)"
186186
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NifToolsMopper" "UninstallString" "$INSTDIR\uninstall.exe"
187+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NifToolsMopper" "InstallLocation" "$INSTDIR" ; for other apps to find mopper
188+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NifToolsMopper" "VersionMajor" ${VERSIONMAJOR}
189+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NifToolsMopper" "VersionMinor" ${VERSIONMINOR}
190+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NifToolsMopper" "VersionServicePack" ${VERSIONSERVICEPACK}
191+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NifToolsMopper" "Publisher" "NifTools"
187192
SetOutPath $INSTDIR
188193
WriteUninstaller "uninstall.exe"
189194

@@ -202,7 +207,6 @@ Section "Uninstall"
202207

203208
; remove registry keys
204209
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NifToolsMopper"
205-
DeleteRegKey HKLM "SOFTWARE\NifToolsMopper"
206210

207211
; remove program files and program directory
208212
Delete "$INSTDIR\*.*"

0 commit comments

Comments
 (0)