Skip to content

Commit

Permalink
Merge pull request #172 from jdmears2/silent-install-option
Browse files Browse the repository at this point in the history
Updating installer to support managed (silent) installations and upgrade...
  • Loading branch information
Brent Matzelle committed Apr 29, 2015
2 parents 75d05a9 + f17fee7 commit c1d59b6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions setup/Gow.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
; Constants

!define PRODUCT "Gow"
!define VERSION "0.8.0"
!define VERSION "0.8.0-1"
!define SRC_DIR ".."

Name "${PRODUCT}"
Expand Down Expand Up @@ -154,6 +154,8 @@ Function Registry
WriteRegStr HKLM "SOFTWARE\${PRODUCT}" "" "$INSTDIR"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" \
"DisplayName" "${PRODUCT}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" \
"DisplayVersion" "${VERSION}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" \
"UninstallString" '"$INSTDIR\Uninstall.exe"'
FunctionEnd
Expand All @@ -178,12 +180,12 @@ Function RemoveOldInstallation
MessageBox MB_OKCANCEL \
"${PRODUCT} is already installed. $\n$\nClick OK to remove the \
previous version or Cancel to cancel this upgrade." \
IDOK uninstall
/SD IDOK IDOK uninstall
Abort

uninstall:
; Do not copy the uninstaller to a temp file
ExecWait '$R0 _?=$INSTDIR'
ExecWait '$R0 /S _?=$INSTDIR'

IfErrors 0 EndFunction
; TODO: Perform error checking here
Expand Down

0 comments on commit c1d59b6

Please sign in to comment.