@@ -24,16 +24,31 @@ ${endif}
24
24
${endif}
25
25
!endif
26
26
27
- ReadRegStr $R0 SHCTX " ${UNINSTALL_REGISTRY_KEY}" UninstallString
27
+ # http://stackoverflow.com/questions/24595887/waiting-for-nsis-uninstaller-to-finish-in-nsis-installer-either-fails-or-the-uni
28
+
29
+ ReadRegStr $R0 SHCTX " ${UNINSTALL_REGISTRY_KEY}" UninstallerPath
28
30
${if} $R0 != " "
29
- ExecWait " $R0 /S /KEEP_APP_DATA"
31
+ ReadRegStr $R1 SHCTX " ${INSTALL_REGISTRY_KEY}" InstallLocation
32
+ ${if} $R1 != " "
33
+ CopyFiles /SILENT /FILESONLY " $R0" " $PLUGINSDIR\old-uninstaller.exe"
34
+
35
+ ${if} $installMode == " all"
36
+ ExecWait " $PLUGINSDIR\old-uninstaller.exe _?=$R1 /S /KEEP_APP_DATA /allusers"
37
+ ${Else}
38
+ ExecWait " $PLUGINSDIR\old-uninstaller.exe _?=$R1 /S /KEEP_APP_DATA /currentuser"
39
+ ${endif}
40
+ ${endif}
30
41
${endif}
31
42
43
+ # remove per-user installation
32
44
${if} $installMode == " all"
33
- # remove per-user installation
34
- ReadRegStr $R0 HKEY_CURRENT_USER " ${UNINSTALL_REGISTRY_KEY}" UninstallString
45
+ ReadRegStr $R0 HKEY_CURRENT_USER " ${UNINSTALL_REGISTRY_KEY}" UninstallerPath
35
46
${if} $R0 != " "
36
- ExecWait " $R0 /S /KEEP_APP_DATA"
47
+ ReadRegStr $R1 HKEY_CURRENT_USER " ${INSTALL_REGISTRY_KEY}" InstallLocation
48
+ ${if} $R1 != " "
49
+ CopyFiles /SILENT /FILESONLY " $R0" " $PLUGINSDIR\old-uninstaller.exe"
50
+ ExecWait " $PLUGINSDIR\old-uninstaller.exe _?=$R1 /S /KEEP_APP_DATA /currentuser"
51
+ ${endif}
37
52
${endif}
38
53
${endif}
39
54
@@ -50,12 +65,12 @@ SetCompress "${COMPRESS}"
50
65
51
66
!ifdef APP_64
52
67
${If} ${RunningX64}
53
- Nsis7z::ExtractWithDetails " $PLUGINSDIR\app-64.7z" " Installing %s... "
68
+ Nsis7z::Extract " $PLUGINSDIR\app-64.7z"
54
69
${Else}
55
- Nsis7z::ExtractWithDetails " $PLUGINSDIR\app-32.7z" " Installing %s... "
70
+ Nsis7z::Extract " $PLUGINSDIR\app-32.7z"
56
71
${endif}
57
72
!else
58
- Nsis7z::ExtractWithDetails " $PLUGINSDIR\app-32.7z" " Installing %s... "
73
+ Nsis7z::Extract " $PLUGINSDIR\app-32.7z"
59
74
!endif
60
75
61
76
File " /oname=${UNINSTALL_FILENAME}" " ${UNINSTALLER_OUT_FILE}"
0 commit comments