You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows installer always installs to C:/Program Files #6057
I prefer to install all of my dev apps in one directory (C:/apps) but when using the Node.js Windows installer it always gets installed in C:/Program Files regardless of what I put in the installer.
I can confirm there is a bug (I consider it as such) at least on Windows 7. Windows 10 works fine though. @mscdex@Fishrock123 this would need re-labeling.
@balane can you run msinfo32 and copy-paste the result here. I just did a fresh install after I bought a OEM Professional version and there it did work as expected. Before, I tested with modern_ie. So good news for us is it is not affecting everyone on windows...hopefully.
Build number of Windows, Architecture etc. Before I go debugging I wanted to have as much information as possible. Minus security relevant stuff of course...
OS Name Microsoft Windows 7 Enterprise
Version 6.1.7601 Service Pack 1 Build 7601
Other OS Description Not Available
OS Manufacturer Microsoft Corporation
System Manufacturer Dell Inc.
System Model Latitude E6510
System Type x64-based PC
Processor Intel(R) Core(TM) i7 CPU Q 740 @ 1.73GHz, 1734 Mhz, 4 Core(s), 8 Logical Processor(s)
BIOS Version/Date Dell Inc. A16, 12/5/2013
SMBIOS Version 2.6
Windows Directory C:\Windows
System Directory C:\Windows\system32
Boot Device \Device\HarddiskVolume2
Locale United States
Hardware Abstraction Layer Version = "6.1.7601.17514"
Time Zone Central Daylight Time
Installed Physical Memory (RAM) 8.00 GB
Total Physical Memory 7.93 GB
Available Physical Memory 4.17 GB
Total Virtual Memory 15.9 GB
Available Virtual Memory 12.4 GB
Page File Space 7.93 GB
I could not reproduce this. I tried to create the registry values that the installer reads (Software/Node.js under HKLM and HKCU) and those are read correctly but the path chosen by the user is always used.
@balane can you try to create a installation log? Use:
Hmm. I couldn't reproduce (again) neither, even though it was reproducable earlier. It's likely related to Windows being under whatever circumstances. Just installing again then solves it though. I would vote for closing this until there is some logged reproduction. @joaocgreismsiexec /i C:\Users\myusername\Downloads\somepackage.msi /L*v install.txt would be logging sufficiently I assume?
The directory change is happening on the client side...
MSI (c) (F4:48) [16:08:46:758]: PROPERTY CHANGE: Modifying INSTALLDIR property. Its current value is 'C:\Program Files\nodejs\'. Its new value: 'C:\apps\nodejs\'.
...but never makes it to the server side...
MSI (s) (58:9C) [16:08:57:831]: Ignoring disallowed property INSTALLDIR
This results in the server-side using the default value...
MSI (s) (58:9C) [16:08:57:984]: PROPERTY CHANGE: Adding INSTALLDIR property. Its value is 'C:\Program Files\nodejs\'.
It's what happens on the server side that counts.
The problem is that INSTALLDIR needs to be added to the SecureCustomProperties MSI property. Something like this:
With the tips from above, I could finally reproduce this. On Windows 7 64-bit, node 4.4.2 64-bit:
In the Administrator account, use the Group Policy Editor to enable Always install with elevated privileges, from both User and Computer Configuration under Administrative Template, All Settings.
Switch to a user with a non-Administrator account, install node. This issue happens.
The patch above seems to be the way to fix this (thanks @mcnameej!). @eljefedelrodeodeljefe if you can make a PR, that'd be great! I'll review and can test in Windows 7.
There are two other things I'd investigate here. From the WiX documentation, there is a Secure attribute that could be used instead, something like <Property Id="INSTALLDIR" Secure="yes"> (@eljefedelrodeodeljefe can you give this a try first?). Also, some other properties are ignored but it seems that they are set correctly in the server side. I'd be happy if the fix installs with the MSI and INSTALLDIR in different drives, both non C:. I can test this when I review.
Activity
[-]Node always installs to C:/Program Files[/-][+]Windows installer always installs to C:/Program Files[/+]eljefedelrodeodeljefe commentedon Apr 6, 2016
I can confirm there is a bug (I consider it as such) at least on Windows 7. Windows 10 works fine though. @mscdex @Fishrock123 this would need re-labeling.
eljefedelrodeodeljefe commentedon Apr 6, 2016
@balane can you run
msinfo32and copy-paste the result here. I just did a fresh install after I bought a OEM Professional version and there it did work as expected. Before, I tested with modern_ie. So good news for us is it is not affecting everyone on windows...hopefully.balane commentedon Apr 6, 2016
What exactly are you looking for from the msinfo32 result?
eljefedelrodeodeljefe commentedon Apr 7, 2016
Build number of Windows, Architecture etc. Before I go debugging I wanted to have as much information as possible. Minus security relevant stuff of course...
balane commentedon Apr 7, 2016
OS Name Microsoft Windows 7 Enterprise
Version 6.1.7601 Service Pack 1 Build 7601
Other OS Description Not Available
OS Manufacturer Microsoft Corporation
System Manufacturer Dell Inc.
System Model Latitude E6510
System Type x64-based PC
Processor Intel(R) Core(TM) i7 CPU Q 740 @ 1.73GHz, 1734 Mhz, 4 Core(s), 8 Logical Processor(s)
BIOS Version/Date Dell Inc. A16, 12/5/2013
SMBIOS Version 2.6
Windows Directory C:\Windows
System Directory C:\Windows\system32
Boot Device \Device\HarddiskVolume2
Locale United States
Hardware Abstraction Layer Version = "6.1.7601.17514"
Time Zone Central Daylight Time
Installed Physical Memory (RAM) 8.00 GB
Total Physical Memory 7.93 GB
Available Physical Memory 4.17 GB
Total Virtual Memory 15.9 GB
Available Virtual Memory 12.4 GB
Page File Space 7.93 GB
orangemocha commentedon Apr 7, 2016
cc @joaocgreis , our MSI expert.
joaocgreis commentedon Apr 7, 2016
I could not reproduce this. I tried to create the registry values that the installer reads (
Software/Node.jsunderHKLMandHKCU) and those are read correctly but the path chosen by the user is always used.@balane can you try to create a installation log? Use:
eljefedelrodeodeljefe commentedon Apr 7, 2016
Hmm. I couldn't reproduce (again) neither, even though it was reproducable earlier. It's likely related to Windows being under whatever circumstances. Just installing again then solves it though. I would vote for closing this until there is some logged reproduction. @joaocgreis
msiexec /i C:\Users\myusername\Downloads\somepackage.msi /L*v install.txtwould be logging sufficiently I assume?balane commentedon Apr 7, 2016
InstallLog.txt
From a quick glance through the log file looks like it's saying that it correctly installed to C:/apps/nodejs but it absolutely did not.
mcnameej commentedon Apr 24, 2016
The directory change is happening on the client side...
...but never makes it to the server side...
This results in the server-side using the default value...
It's what happens on the server side that counts.
The problem is that INSTALLDIR needs to be added to the SecureCustomProperties MSI property. Something like this:
(To answer the next logical question... Sorry, NO, I can't submit a PR for this right now.)
eljefedelrodeodeljefe commentedon May 3, 2016
@joaocgreis does @mcnameej's patch seem reasonable (does to me)? I can make the PR and give it a try, but would need someone to review.
joaocgreis commentedon May 3, 2016
With the tips from above, I could finally reproduce this. On Windows 7 64-bit, node 4.4.2 64-bit:
Always install with elevated privileges, from bothUserandComputer ConfigurationunderAdministrative Template,All Settings.The patch above seems to be the way to fix this (thanks @mcnameej!). @eljefedelrodeodeljefe if you can make a PR, that'd be great! I'll review and can test in Windows 7.
There are two other things I'd investigate here. From the WiX documentation, there is a
Secureattribute that could be used instead, something like<Property Id="INSTALLDIR" Secure="yes">(@eljefedelrodeodeljefe can you give this a try first?). Also, some other properties are ignored but it seems that they are set correctly in the server side. I'd be happy if the fix installs with the MSI andINSTALLDIRin different drives, both nonC:. I can test this when I review.win,msi: mark INSTALLDIR property as secure
win,msi: mark INSTALLDIR property as secure
win,msi: mark INSTALLDIR property as secure
win,msi: mark INSTALLDIR property as secure
win,msi: mark INSTALLDIR property as secure