Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

win,msi: change InstallScope to perMachine #25590

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 27 additions & 12 deletions tools/msvs/msi/product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
Manufacturer="$(var.ProductAuthor)"
UpgradeCode="1d60944c-b9ce-4a71-a7c0-0384eb884baa">

<Package InstallerVersion="200" Compressed="yes"/>
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine"/>

<Media Id="1" Cabinet="media1.cab" EmbedCab="yes"/>

Expand All @@ -31,6 +31,11 @@
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR"/>

<Property Id="INSTALLDIR">
<RegistrySearch Id="InstallPathRegistryLM"
Type="raw"
Root="HKLM"
Key="$(var.RegistryKeyPath)"
Name="InstallPath"/>
<RegistrySearch Id="InstallPathRegistry"
Type="raw"
Root="HKCU"
Expand All @@ -44,8 +49,9 @@
Description="Install the core Node.js runtime (node.exe)."
Absent="disallow">
<ComponentRef Id="NodeExecutable"/>
<ComponentRef Id="NodeRegistryEntries"/>
<ComponentRef Id="NodeVarsScript"/>
<ComponentRef Id="NodeStartMenuAndRegistryEntries"/>
<ComponentRef Id="NodeStartMenu"/>
<ComponentGroupRef Id="Product.Generated"/>

<Feature Id="NodePerfCtrSupport"
Expand Down Expand Up @@ -115,6 +121,20 @@
<File Id="node.exe" KeyPath="yes" Source="$(var.SourceDir)\node.exe"/>
</Component>

<Component Id="NodeRegistryEntries">
<RegistryValue Root="HKLM"
Key="$(var.RegistryKeyPath)"
Name="InstallPath"
Type="string"
Value="[INSTALLDIR]"
KeyPath="yes"/>
<RegistryValue Root="HKLM"
Key="$(var.RegistryKeyPath)"
Name="Version"
Type="string"
Value="$(var.ProductVersion)"/>
</Component>

<Component Id="NodeVarsScript">
<File Id="nodevars.bat" KeyPath="yes" Source="$(var.RepoDir)\tools\msvs\nodevars.bat"/>
</Component>
Expand All @@ -137,18 +157,13 @@
</DirectoryRef>

<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="NodeStartMenuAndRegistryEntries">
<Component Id="NodeStartMenu">
<RegistryValue Root="HKCU"
Key="$(var.RegistryKeyPath)"
Name="InstallPath"
Type="string"
Value="[INSTALLDIR]"
Key="$(var.RegistryKeyPath)\Components"
Name="NodeStartMenuShortcuts"
Type="integer"
Value="1"
KeyPath="yes"/>
<RegistryValue Root="HKCU"
Key="$(var.RegistryKeyPath)"
Name="Version"
Type="string"
Value="$(var.ProductVersion)"/>
<Shortcut Id="NodeVarsScriptShortcut"
Name="Node.js command prompt"
Target="[%ComSpec]"
Expand Down