Closed noelhibbard closed 8 months ago
Thanks for this. I am pressed for time too, but if someone wants to take a shot at this, I'd accept a PR.
I will try to get to over the weekend sometime.
I created a pull request here: https://github.com/coreybutler/nvm-windows/pull/459
@mcgwiz yes. Thanks for pointing that out.
My windows account does not have admin rights so when I run the nvm installer it prompts for creds. When I type creds for an admin account the installer defaults to my correct user profile folder (not the admin's) but when it creates the %NVM_HOME% and %NVM_SYMLINK% vars and adds them to the %PATH% it's creating them in the admin's profile rather than my non-admin profile.
Inno Setup has an ExecAsOriginalUser function which will execute a program in the non-elevated environment which could be used to add the registry values to the correct HKCU.
For example:
Manipulating the path would require you to do REG QUERY and then parse the stdout. I just don't have time to mess with this right now. It would be great if these changes could be made to the installer though.