File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -63,18 +63,21 @@ Var installMode
63
63
64
64
# SHCTX is the hive HKLM if SetShellVarContext all, or HKCU if SetShellVarContext user
65
65
!macro registryAddInstallInfo
66
- # Write the installation path into the registry
67
66
WriteRegStr SHCTX " ${INSTALL_REGISTRY_KEY}" InstallLocation " $INSTDIR"
68
67
69
- # Write the uninstall keys for Windows
70
68
${if} $installMode == " all"
71
- WriteRegStr SHCTX " ${UNINSTALL_REGISTRY_KEY} " DisplayName " ${UNINSTALL_DISPLAY_NAME} "
72
- WriteRegStr SHCTX " ${UNINSTALL_REGISTRY_KEY} " UninstallString ' "$INSTDIR\${UNINSTALL_FILENAME}" /allusers '
69
+ StrCpy $0 " /allusers "
70
+ StrCpy $1 " "
73
71
${else}
74
- WriteRegStr SHCTX " ${UNINSTALL_REGISTRY_KEY} " DisplayName " ${UNINSTALL_DISPLAY_NAME} (only current user) "
75
- WriteRegStr SHCTX " ${UNINSTALL_REGISTRY_KEY} " UninstallString ' "$INSTDIR\${UNINSTALL_FILENAME}" /currentuser '
72
+ StrCpy $0 " /currentuser "
73
+ StrCpy $1 " (only current user) "
76
74
${endif}
77
75
76
+ WriteRegStr SHCTX " ${UNINSTALL_REGISTRY_KEY}" DisplayName " ${UNINSTALL_DISPLAY_NAME}$1"
77
+ # https://github.com/electron-userland/electron-builder/issues/750
78
+ StrCpy $2 " $INSTDIR\${UNINSTALL_FILENAME}"
79
+ WriteRegStr SHCTX " ${UNINSTALL_REGISTRY_KEY}" UninstallString ' "$2" $0'
80
+
78
81
WriteRegStr SHCTX " ${UNINSTALL_REGISTRY_KEY}" " DisplayVersion" " ${VERSION}"
79
82
WriteRegStr SHCTX " ${UNINSTALL_REGISTRY_KEY}" " DisplayIcon" " $appExe,0"
80
83
WriteRegStr SHCTX " ${UNINSTALL_REGISTRY_KEY}" " Publisher" " ${COMPANY_NAME}"
You can’t perform that action at this time.
0 commit comments