-
Notifications
You must be signed in to change notification settings - Fork 7.3k
NodeJS Windows MSI installs Per User #7629
Comments
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]>
Fixed by 8e80528. Thank you! |
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]>
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]>
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]>
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. 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 :) |
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.
The text was updated successfully, but these errors were encountered: