Giter VIP home page Giter VIP logo

Comments (18)

byteshiva avatar byteshiva commented on May 22, 2024 13

The workaround mentioned in #22 worked!!

For wider audience I'm detailing the steps
Steps followed,

  1. Open cmd using Admin Privilege
  2. cd c:\users\AppData\Roaming\nvm
  3. cp settings.txt to c:\

image

I could use to copy settings.txt to c:\ .

from nvm-windows.

jamesmanning avatar jamesmanning commented on May 22, 2024 9

@jamiehutber @reflexdemon just searching for settings.txt seems to indicate that it's looking for the file related to the NVM_HOME environment variable, so setting that might be sufficient?

From an elevated cmd prompt, you should be able to run:

setx /m NVM_HOME %APPDATA%\nvm  

Then open a new cmd prompt (so it has that variable set, it won't populate into existing ones) and try nvm without settings.txt in the root?

Seems like the install mechanism should set that variable if it's not already set, I would guess?

It looks like the 'manual' install method already does so, AFAICT.

from nvm-windows.

hutber avatar hutber commented on May 22, 2024 3

I know its stupid, but I don't really like having a settings file in my root :( I like a clean drive at all times

from nvm-windows.

reflexdemon avatar reflexdemon commented on May 22, 2024 1

Oops! none of the workaround works for me.

I get the below error.

cp: cannot create regular file 'c:\\settings.txt': Permission denied

from nvm-windows.

coreybutler avatar coreybutler commented on May 22, 2024

Closing as a duplicate of issue #22.

from nvm-windows.

byteshiva avatar byteshiva commented on May 22, 2024

I'm getting the same error after installing 1.6.0 with hotfix.

image

PFA for settings.txt folder

image

from nvm-windows.

coreybutler avatar coreybutler commented on May 22, 2024

Sorry, I referenced the wrong issue when I closed this. It has still been filed before though. Please see issue #22.

from nvm-windows.

jamesmanning avatar jamesmanning commented on May 22, 2024

@reflexdemon needs to be an elevated cmd - make sure the title bar of the cmd.exe window says "Administrator:" like in the sshot.

from nvm-windows.

reflexdemon avatar reflexdemon commented on May 22, 2024

@jamesmanning apparently, I have a to do this on my work machine where I dont have admin rights.

from nvm-windows.

dreamingUpCode avatar dreamingUpCode commented on May 22, 2024

Had the same issue on Win 10. Reinstalled it and works fine now.

from nvm-windows.

lorezzed avatar lorezzed commented on May 22, 2024

@byteshiva use "copy" instead of "cp" if you don't have cygwin:

  1. Open cmd using Admin Privilege
  2. cd c:\users<username>\AppData\Roaming\nvm
  3. copy settings.txt c:\

Works a treat thanks.

from nvm-windows.

kpentchev avatar kpentchev commented on May 22, 2024

@jamesmanning thank you!

from nvm-windows.

henrycaosg avatar henrycaosg commented on May 22, 2024

@jamesmanning thank you!

from nvm-windows.

kkoci avatar kkoci commented on May 22, 2024

@byteshiva Awesome, worked like a charm!

from nvm-windows.

fritx avatar fritx commented on May 22, 2024

When I clicked the install.cmd, the settings.txt prompted, but I didn't save the file.
The settings.txt would never prompt again.
What could I do?

from nvm-windows.

 avatar commented on May 22, 2024

@jamesmanning Works great.

Now why doesn't the installer do this for you?

from nvm-windows.

coreybutler avatar coreybutler commented on May 22, 2024

@errorx666 - The installer attempts to do this. However; I've seen hundreds of configurations now that are pretty customized... typically the installer fails silently due to a missing permission. The next version will have a new installer, but that may still be a ways off. Installers are, without any doubt whatsoever, the most time consuming element of this entire project.

For anyone coming across this, I'm looking for contributors who will build and maintain installers across different operating systems.

from nvm-windows.

 avatar commented on May 22, 2024

@coreybutler It may be as easy as changing the installer filename. IIRC, Windows uses the setup.exe filename as a heuristic for backwards compatibility, and automatically creates a UAC prompt to elevate to admin privileges. I'm not sure if Windows' default configuration of opening zip files as "Compressed Folders" affects anything, but in my case, it removed the "Run as Administrator" option from the context menu, and probably led to my broken installation.

from nvm-windows.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.