|
57 | 57 | <!-- Detect legacy NSIS installation --> |
58 | 58 | <Property Id="NSIS_UNINSTALLEXE"> |
59 | 59 | <RegistrySearch Id="RegistryLegacyUninstallString" Type="file" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\$(var.AppName)" Name="UninstallString" Win64="no"> |
60 | | - <FileSearch Id="LegacyUninstallFileName" Name="Uninstall.exe"/> |
61 | | - </RegistrySearch> |
| 60 | + <FileSearch Id="LegacyUninstallFileName" Name="Uninstall.exe"/> |
| 61 | + </RegistrySearch> |
62 | 62 | </Property> |
63 | 63 |
|
64 | 64 | <!-- Property to disable update checks --> |
|
71 | 71 | <SetProperty Id="ExecNsisUninstaller" Value=""$(var.AppShortName)" "[NSIS_UNINSTALLEXE]"" Before="ExecNsisUninstaller" Sequence="execute" /> |
72 | 72 | <SetProperty Id="RemoveNavigationPaneEntries" Value=""$(var.AppName)"" Before="RemoveNavigationPaneEntries" Sequence="execute" /> |
73 | 73 |
|
| 74 | + <!-- Ensure ACLs --> |
| 75 | + <Binary Id="EnsureACL" SourceFile="EnsureACL.js" /> |
| 76 | + <SetProperty Id="EnsureACL" Before="EnsureACL" Value="[INSTALLDIR]" Sequence="execute" /> |
| 77 | + <CustomAction Id="EnsureACL" BinaryKey="EnsureACL" JScriptCall="EnsureACL" Return="check" Execute="deferred" Impersonate="no" /> |
| 78 | + |
74 | 79 | <InstallExecuteSequence> |
75 | 80 | <!-- Install: Remove previous NSIS installation, if detected --> |
76 | 81 | <Custom Action="ExecNsisUninstaller" Before="ProcessComponents">NSIS_UNINSTALLEXE AND NOT Installed</Custom> |
77 | 82 |
|
| 83 | + <!-- Install: Ensure ACLs are set --> |
| 84 | + <Custom Action="EnsureACL" After="InstallFiles">NOT Installed</Custom> |
| 85 | + |
78 | 86 | <!-- Uninstall: Remove sync folders from Explorer's Navigation Pane, only effective for the current user (home users) --> |
79 | 87 | <Custom Action="RemoveNavigationPaneEntries" After="RemoveFiles">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom> |
80 | | - |
81 | | - <!-- Uninstall: Cleanup the Registry --> |
82 | | - <Custom Action="RegistryCleanupCustomAction" After="RemoveFiles">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom> |
| 88 | + |
| 89 | + <!-- Uninstall: Cleanup the Registry --> |
| 90 | + <Custom Action="RegistryCleanupCustomAction" After="RemoveFiles">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom> |
83 | 91 |
|
84 | 92 | <!-- Schedule Reboot for the Shell Extensions (in silent installation mode only, or if SCHEDULE_REBOOT argument is set--> |
85 | 93 | <ScheduleReboot After="InstallFinalize">(SCHEDULE_REBOOT=1) OR NOT (UILevel=2)</ScheduleReboot> |
86 | 94 | </InstallExecuteSequence> |
87 | 95 |
|
88 | 96 | <!-- "Add or Remove" Programs Entries --> |
89 | | - <Property Id="APPNAME">$(var.AppName)</Property> |
| 97 | + <Property Id="APPNAME">$(var.AppName)</Property> |
90 | 98 | <Property Id="ARPPRODUCTICON">$(var.AppIcon)</Property> |
91 | 99 | <Property Id="ARPHELPLINK">$(var.AppHelpLink)</Property> |
92 | 100 | <Property Id="ARPURLINFOABOUT">$(var.AppInfoLink)</Property> |
|
192 | 200 | <RegistryValue Type="integer" Name="skipUpdateCheck" Value="[SKIPAUTOUPDATE]" /> |
193 | 201 | </RegistryKey> |
194 | 202 | </Component> |
195 | | - <!-- Register URI handler --> |
| 203 | + <!-- Register URI handler --> |
196 | 204 | <Component Id="RegistryUriHandler" Guid="*" Win64="$(var.PlatformWin64)"> |
197 | 205 | <RegistryKey Root="HKLM" Key="Software\Classes\$(var.AppCommandOpenUrlScheme)" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes"> |
198 | 206 | <RegistryValue Type="string" Value="URL:$(var.AppName) Protocol" /> |
199 | | - <RegistryValue Type="string" Name="URL Protocol" Value="" /> |
| 207 | + <RegistryValue Type="string" Name="URL Protocol" Value="" /> |
200 | 208 | </RegistryKey> |
201 | 209 | <RegistryKey Root="HKLM" Key="Software\Classes\$(var.AppCommandOpenUrlScheme)\DefaultIcon" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes"> |
202 | 210 | <RegistryValue Type="string" Value="[INSTALLDIR]$(var.AppExe)" /> |
|
214 | 222 |
|
215 | 223 | <ComponentRef Id="RegistryVersionInfo" /> |
216 | 224 | <ComponentRef Id="RegistryDefaultSettings" /> |
217 | | - <ComponentRef Id="RegistryUriHandler" /> |
| 225 | + <ComponentRef Id="RegistryUriHandler" /> |
218 | 226 |
|
219 | 227 | <Feature Id="ShellExtensions" Title="Integration for Windows Explorer" |
220 | 228 | Description="This feature requires a reboot." > |
|
0 commit comments