Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installer improvements when alt creds are required for elevation #459

Merged
merged 4 commits into from
Feb 14, 2023

Conversation

noelhibbard
Copy link
Contributor

When installing nvm-windows, if you supply alternate credentials to gain elevation, the installer will create the user environment variables under the user profile of the credentials you supplied rather then the user profile of the user who originally launched the installer. To get around this I made use of the ExecAsOriginalUser Inno Setup function. This function lets you shell execute under the original user. I was able to call REG.EXE to add %NVM_HOME% and %NVM_SYMLINK% but to handle the parsing/appending of the original path I had to create a VBScript and launch it with ExecAsOriginalUser. I actually created a setuserenv.vbs for the install and unsetuserenv.vbs for the uninstall.

@coreybutler
Copy link
Owner

Thanks for this, and sorry for the delayed response (I've been out of town). I should be able to review/test this next week.

@ChristianSchramm
Copy link

Is there any Update when you have time for some review? Sounds like a solution for my problems too. :)

@coreybutler coreybutler merged commit 1216b37 into coreybutler:master Feb 14, 2023
@coreybutler
Copy link
Owner

Better late than never. This just got buried.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants