Skip to content

Problem with v1.1.10 Install.cmd #913

@davidpporter

Description

@davidpporter

I found two problems with install.cmd from v1.1.10.

Steps to Reproduce:

  • Unzip nvm-noinstall.zip (I unzipped to d:\apps\nvm)
  • Open elevated command prompt in the above directory
  • Run install.cmd

Problem 1:

D:\Apps\nvm>install.cmd
Enter the absolute path where the nvm-windows zip file is extracted/copied to: D:\Apps\nvm

SUCCESS: Specified value was saved.

SUCCESS: Specified value was saved.
\NVIDIA was unexpected at this time.

The error was generated at line 8. I'm guessing it was caused by spaces in directory names in the PATH (my path included this directory: C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR). The batch file stopped processing after this error.

Removing the parentheses from the echo command bypassed the error and correctly wrote the path to the specified file.
Old: (echo PATH=%PATH%) > %NVM_HOME%\PATH.txt
New: echo PATH=%PATH% > %NVM_HOME%\PATH.txt

Problem 2:
Setting the PATH at line 11 didn't expand the environment variables NVM_HOME and NVM_SYMLINK (the resulting PATH included the literal strings %NVM_HOME% and %NVM_SYMLINK%, not the values of the variables).

Changing the double percent signs surrounding the variable names to single percent signs fixed the problem.
Old: setx /M PATH "%%B;%%NVM_HOME%%;%%NVM_SYMLINK%%"
New: setx /M PATH "%%B;%NVM_HOME%;%NVM_SYMLINK%"

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions