Skip to content

Commit

Permalink
Merge pull request RocketChat#313 from alexbrazier/feature/startup
Browse files Browse the repository at this point in the history
Run at startup option for Windows
  • Loading branch information
rodrigok authored Jan 23, 2017
2 parents f0227b9 + c41b962 commit 7639eed
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions build/win/installer.nsh
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
!ifndef BUILD_UNINSTALLER
Function AddToStartup
CreateShortCut "$SMSTARTUP\Rocket.Chat+.lnk" "$INSTDIR\Rocket.Chat+.exe" ""
FunctionEnd

; Using the read me setting as an easy way to add an add to startup option
!define MUI_FINISHPAGE_SHOWREADME
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Run at startup"
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION AddToStartup
!endif

!macro customInstall
; Required as electron-builder does not provide a way to specify it as of version 11.2.4
WriteRegStr SHCTX "${UNINSTALL_REGISTRY_KEY}" "DisplayIcon" '"$INSTDIR\resources\build\icon.ico"'
!macroend

!macro customUnInstall
Delete "$SMSTARTUP\Rocket.Chat+.lnk"
!macroend

0 comments on commit 7639eed

Please sign in to comment.