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

NodeJS Windows MSI installs Per User #7629

Closed
iswix-llc opened this issue May 15, 2014 · 2 comments
Closed

NodeJS Windows MSI installs Per User #7629

iswix-llc opened this issue May 15, 2014 · 2 comments
Labels

Comments

@iswix-llc
Copy link

The node-v0.10.28-x86.msi does not have the ALLUSERS property defined in the property table and doesn't have a UI option for selecting per-user / per-machine. This means by default it installs as per-user. The resources are installed in per-machine locations though. This creates servicing problems in that only the person who originally did the install can uninstall it. I discovered this when I was creating an installer and I wanted to use the Upgrade table to detect the NodeJS install and block installation if it wasn't present. Since another developer did the NodeJS install my MSI couldn't find the NodeJS installed product. The following code should be added to the WiX source:

(tag) Property Id="ALLUSERS" Value="1" (endtag)

On a side note, it's not possible to perform a major upgrade and switch installation context. Deployed versions of NodeJS will have to be first uninstalled.

@jasnell jasnell added the windows label Jun 3, 2015
joaocgreis added a commit that referenced this issue Jul 22, 2015
The MSI install scope was set to the WiX default, which is per-user.
However, with UAC, it could not be installed by a standard user because
InstallPrivileges is elevated by default, hence the install scope
should be set to per-machine. Furthermore, the default install path is
a per-machine location and setting the system path requires
administrator privileges.

By changing the InstallScope to perMachine, Start Menu shortcuts are
placed in ProgramData and not the installing user's AppData folder,
making the shortcuts available to other users. This also fixes the
installation when AppData is a network folder.

The custom action is necessary to allow upgrades. Since a per-machine
MSI cannot upgrade an application installed per-user, the custom action
checks if there is going to be an upgrade to a previous version
installed per-user and sets the installation as per-user to allow
upgrading. Hence, the advantages of installing per-machine will only
apply in fresh installations.

Fixes #5849
Fixes #7629

PR-URL: #25640
Reviewed-By: Alexis Campailla <[email protected]>
Reviewed-By: Bert Belder <[email protected]>
@joaocgreis
Copy link
Member

Fixed by 8e80528. Thank you!

joaocgreis added a commit to JaneaSystems/node that referenced this issue Aug 28, 2015
This is an adaptation of 8e80528.

Original commit message:

  The MSI install scope was set to the WiX default, which is per-user.
  However, with UAC, it could not be installed by a standard user
  because InstallPrivileges is elevated by default, hence the install
  scope should be set to per-machine. Furthermore, the default install
  path is a per-machine location and setting the system path requires
  administrator privileges.

  By changing the InstallScope to perMachine, Start Menu shortcuts are
  placed in ProgramData and not the installing user's AppData folder,
  making the shortcuts available to other users. This also fixes the
  installation when AppData is a network folder.

  The custom action is necessary to allow upgrades. Since a per-machine
  MSI cannot upgrade an application installed per-user, the custom
  action checks if there is going to be an upgrade to a previous
  version installed per-user and sets the installation as per-user to
  allow upgrading. Hence, the advantages of installing per-machine will
  only apply in fresh installations.

  Fixes nodejs/node-v0.x-archive#5849
  Fixes nodejs/node-v0.x-archive#7629

  PR-URL: nodejs/node-v0.x-archive#25640
  Reviewed-By: Alexis Campailla <[email protected]>
  Reviewed-By: Bert Belder <[email protected]>

The original commit was adapted to search all upgrade codes listed in
the upgrade table, as the current installer tries to upgrade from two
different upgrade codes.

PR-URL: nodejs#2565
Reviewed-By: Alexis Campailla <[email protected]>
rvagg pushed a commit to rvagg/io.js that referenced this issue Aug 29, 2015
This is an adaptation of 8e80528.

Original commit message:

  The MSI install scope was set to the WiX default, which is per-user.
  However, with UAC, it could not be installed by a standard user
  because InstallPrivileges is elevated by default, hence the install
  scope should be set to per-machine. Furthermore, the default install
  path is a per-machine location and setting the system path requires
  administrator privileges.

  By changing the InstallScope to perMachine, Start Menu shortcuts are
  placed in ProgramData and not the installing user's AppData folder,
  making the shortcuts available to other users. This also fixes the
  installation when AppData is a network folder.

  The custom action is necessary to allow upgrades. Since a per-machine
  MSI cannot upgrade an application installed per-user, the custom
  action checks if there is going to be an upgrade to a previous
  version installed per-user and sets the installation as per-user to
  allow upgrading. Hence, the advantages of installing per-machine will
  only apply in fresh installations.

  Fixes nodejs/node-v0.x-archive#5849
  Fixes nodejs/node-v0.x-archive#7629

  PR-URL: nodejs/node-v0.x-archive#25640
  Reviewed-By: Alexis Campailla <[email protected]>
  Reviewed-By: Bert Belder <[email protected]>

The original commit was adapted to search all upgrade codes listed in
the upgrade table, as the current installer tries to upgrade from two
different upgrade codes.

PR-URL: nodejs#2565
Reviewed-By: Alexis Campailla <[email protected]>
jBarz pushed a commit to ibmruntimes/node that referenced this issue Nov 4, 2016
The MSI install scope was set to the WiX default, which is per-user.
However, with UAC, it could not be installed by a standard user because
InstallPrivileges is elevated by default, hence the install scope
should be set to per-machine. Furthermore, the default install path is
a per-machine location and setting the system path requires
administrator privileges.

By changing the InstallScope to perMachine, Start Menu shortcuts are
placed in ProgramData and not the installing user's AppData folder,
making the shortcuts available to other users. This also fixes the
installation when AppData is a network folder.

The custom action is necessary to allow upgrades. Since a per-machine
MSI cannot upgrade an application installed per-user, the custom action
checks if there is going to be an upgrade to a previous version
installed per-user and sets the installation as per-user to allow
upgrading. Hence, the advantages of installing per-machine will only
apply in fresh installations.

Fixes nodejs#5849
Fixes nodejs#7629

PR-URL: nodejs#25640
Reviewed-By: Alexis Campailla <[email protected]>
Reviewed-By: Bert Belder <[email protected]>
@heifer1981
Copy link

Hi all. I know this issue is closed and that Node has moved on significantly since this. Just to put things into context for this comment we use Meteor but to deploy easily onto Windows hardware we demeteorize our projects so it will run on node and node v 0.10.4 is the only version so far we have found this works for. I spent days trying to find why our WIX Uninstallation would not work and this thread let me to what it was. In my WIX package I force the per machine setting to yes and now the nodejs package uninstalls without error and without needing custom actions to perform this cleanup.
Eg. MsiPackage Id="NodeJSMSI"
DisplayName="Node JS Framework Installer"
Cache="yes"
Compressed="no"
Permanent="no"
Vital="yes"
DisplayInternalUI="yes"
EnableFeatureSelection="yes"
ForcePerMachine="yes"
SourceFile=".\node-v0.10.40-x64.msi"

Hope this helps someone else trying to figure out why nodejs is breaking your uninstallation chain and the settings it requires to perform this operation automagically :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants