-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fdccca7
commit 7f9d4dc
Showing
2 changed files
with
15 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,40 @@ | ||
!include "EnVar.nsh" | ||
|
||
!define PRODUCT_NAME "maestro-cli" | ||
|
||
OutFile "maestro-installer.exe" | ||
|
||
Section | ||
; Set output path to the installation directory. | ||
SetOutPath $PROGRAMFILES\maestro-bundle | ||
SetOutPath $PROGRAMFILES64\maestro-bundle | ||
|
||
File ..\dist\maestro\maestro.exe | ||
File /r ..\dist\maestro\_internal | ||
|
||
; Add $PROGRAMFILES\maestro-bundle to PATH | ||
EnVar::AddValue HKCU "Path" "$PROGRAMFILES\maestro-bundle" | ||
; Add $PROGRAMFILES64\maestro-bundle to PATH | ||
EnVar::AddValue HKCU "Path" "$PROGRAMFILES64\maestro-bundle" | ||
|
||
; Add uninstaller registry key | ||
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayName" "${PRODUCT_NAME}" | ||
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "UninstallString" "$PROGRAMFILES\maestro-uninstall.exe" | ||
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\$PRODUCT_NAME" "DisplayName" "$PRODUCT_NAME" | ||
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\$PRODUCT_NAME" "UninstallString" "$PROGRAMFILES64\maestro-uninstall.exe" | ||
SectionEnd | ||
|
||
Section -Post | ||
; Write uninstaller | ||
WriteUninstaller "$PROGRAMFILES\maestro-uninstall.exe" | ||
WriteUninstaller "$PROGRAMFILES64\maestro-uninstall.exe" | ||
SectionEnd | ||
|
||
; Uninstaller | ||
Section "Uninstall" | ||
; Remove $PROGRAMFILES\maestro-bundle | ||
RMDir /r "$PROGRAMFILES\maestro-bundle" | ||
; Remove $PROGRAMFILES64\maestro-bundle | ||
RMDir /r "$PROGRAMFILES64\maestro-bundle" | ||
|
||
; Remove $PROGRAMFILES\maestro from PATH | ||
EnVar::RemoveValue HKCU "Path" "$PROGRAMFILES\maestro-bundle" | ||
; Remove $PROGRAMFILES64\maestro from PATH | ||
EnVar::RemoveValue HKCU "Path" "$PROGRAMFILES64\maestro-bundle" | ||
|
||
; Remove $PROGRAMFILES\maestro-uninstall.exe | ||
Delete "$PROGRAMFILES\maestro-uninstall.exe" | ||
; Remove $PROGRAMFILES64\maestro-uninstall.exe | ||
Delete "$PROGRAMFILES64\maestro-uninstall.exe" | ||
|
||
; Remove uninstaller registry key | ||
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" | ||
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\$PRODUCT_NAME" | ||
SectionEnd |