nodejs / help

:sparkles: Need help with Node.js? File an Issue here. :rocket:
1.46k stars 279 forks source link

Node.js fails to install/uninstall - "is not a valid short file name" #1553

Closed smaunsell closed 4 years ago

smaunsell commented 5 years ago

I'm a network admin. One of our web developers has reported an issue trying to install Node.js. Or rather uninstall it. Somehow they managed to get it installed but I don't know how as when I try to install it on my PC I get the same error and it won't install. They get the same error when trying to uninstall.

The error displayed is "Win10Appdata is not a valid short file name". Win10Appdata is the name of a network location that is used for AppData redirection which is done by Group Policy. The PCs are on a Windows 2012R2 domain and the user accounts are also domain users. The %AppData% variable is redirected using Group Policy so that various things are stored in a central location and allow users to move PCs and retain that information. The full path to the redirection of the Windows %AppData% variable is \mydomain.com\Appdata\Win10Appdata{username}\AppData\

All other applications and features within Windows work perfectly fine. Node.js is the only one that has presented any issue.

Usually we use Microsoft's SCCM to deploy software but these users got local administrator access so they could install what they want :( I just tested deploying with SCCM and it successfully installed (using the SYSTEM account_ but I am now unable to uninstall it and get the same error.

Why doesn't it like the AppData redirection? And how can this be resolved?

smaunsell commented 5 years ago

UPDATE: user is logged in to PC as a non-admin account, when they run a .exe it prompts for their admin credentials but the MSI doesn't do that and it fails. Installing via SCCM works but when uninstalling from Add/Remove Programs it doesn't prompt for admin credentials like ALL other applications do and this is why they can't uninstall. There appears to be an issue with the MSI and the way it works with Windows to not prompt for admin credentials. In our case we have a work around as the installation via SCCM as well as the uninstallation via SCCM both work.

gireeshpunathil commented 5 years ago

@smaunsell - is this still an issue?

gireeshpunathil commented 4 years ago

inactive, closing. feel free to reopen if this is still outstanding

DJAG95 commented 4 years ago

in my case, the error comes because a secondary hard drive broke (I use windows at work) and node.js was installed on it

since you can't access the program's path, you can't install or uninstall the program, making it inaccessible, it's frustrating

Captura

johankotze72 commented 2 years ago

I had this issue trying to uninstall a program, which was installed on an external drive, and changed the drive letter since the installation. The solution for me was to change the drive letter back to what it was before (using the Computer Management software) and then uninstall it.

Another way might be to open the registry and find and change the "InstallPath" variable for the software: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\

water007melon commented 2 years ago

https://github.com/nodejs/help/issues/3122#issuecomment-1034619200