|
32 | 32 |
|
33 | 33 | <Property Id="INSTALLDIR">
|
34 | 34 | <RegistrySearch Id="InstallPathRegistry"
|
| 35 | + Type="raw" |
| 36 | + Root="HKLM" |
| 37 | + Key="$(var.RegistryKeyPath)" |
| 38 | + Name="InstallPath"/> |
| 39 | + <!-- Also need to search under HKCU to support upgrading from old |
| 40 | + versions. If we wanted to disable backward compatibility, this |
| 41 | + second search could be deleted. --> |
| 42 | + <RegistrySearch Id="InstallPathRegistryCU" |
35 | 43 | Type="raw"
|
36 | 44 | Root="HKCU"
|
37 | 45 | Key="$(var.RegistryKeyPath)"
|
|
44 | 52 | Description="Install the core Node.js runtime (node.exe)."
|
45 | 53 | Absent="disallow">
|
46 | 54 | <ComponentRef Id="NodeExecutable"/>
|
| 55 | + <ComponentRef Id="NodeRegistryEntries"/> |
47 | 56 | <ComponentRef Id="NodeVarsScript"/>
|
48 |
| - <ComponentRef Id="NodeStartMenuAndRegistryEntries"/> |
| 57 | + <ComponentRef Id="NodeStartMenu"/> |
49 | 58 | <ComponentRef Id="AppData" />
|
50 | 59 | <ComponentGroupRef Id="Product.Generated"/>
|
51 | 60 |
|
|
117 | 126 | <File Id="node.exe" KeyPath="yes" Source="$(var.SourceDir)\node.exe"/>
|
118 | 127 | </Component>
|
119 | 128 |
|
| 129 | + <Component Id="NodeRegistryEntries"> |
| 130 | + <RegistryValue Root="HKLM" |
| 131 | + Key="$(var.RegistryKeyPath)" |
| 132 | + Name="InstallPath" |
| 133 | + Type="string" |
| 134 | + Value="[INSTALLDIR]" |
| 135 | + KeyPath="yes"/> |
| 136 | + <RegistryValue Root="HKLM" |
| 137 | + Key="$(var.RegistryKeyPath)" |
| 138 | + Name="Version" |
| 139 | + Type="string" |
| 140 | + Value="$(var.ProductVersion)"/> |
| 141 | + </Component> |
| 142 | + |
120 | 143 | <Component Id="NodeVarsScript">
|
121 | 144 | <File Id="nodevars.bat" KeyPath="yes" Source="$(var.RepoDir)\tools\msvs\nodevars.bat"/>
|
122 | 145 | </Component>
|
|
139 | 162 | </DirectoryRef>
|
140 | 163 |
|
141 | 164 | <DirectoryRef Id="ApplicationProgramsFolder">
|
142 |
| - <Component Id="NodeStartMenuAndRegistryEntries"> |
| 165 | + <Component Id="NodeStartMenu"> |
| 166 | + <!-- RegistryValue needed because every Component must have a KeyPath. |
| 167 | + Because of ICE43, the Root must be HKCU. --> |
143 | 168 | <RegistryValue Root="HKCU"
|
144 |
| - Key="$(var.RegistryKeyPath)" |
145 |
| - Name="InstallPath" |
146 |
| - Type="string" |
147 |
| - Value="[INSTALLDIR]" |
| 169 | + Key="$(var.RegistryKeyPath)\Components" |
| 170 | + Name="NodeStartMenuShortcuts" |
| 171 | + Type="integer" |
| 172 | + Value="1" |
148 | 173 | KeyPath="yes"/>
|
149 |
| - <RegistryValue Root="HKCU" |
150 |
| - Key="$(var.RegistryKeyPath)" |
151 |
| - Name="Version" |
152 |
| - Type="string" |
153 |
| - Value="$(var.ProductVersion)"/> |
154 | 174 | <Shortcut Id="NodeVarsScriptShortcut"
|
155 | 175 | Name="Node.js command prompt"
|
156 | 176 | Target="[%ComSpec]"
|
|
0 commit comments