Problems when user is not admin
Hi, and thanks for this invaluable tool. Correctly configuring msbuild by hand is a pain.
I've run into a problem when the developer user does not have admin permissions.
To install windows-build-tools one has to start an admin cmd/powershell as the admin user (let's call it admin)
Msbuild gets installed correctly this way, but the problem is, that Python gets installed in C:\Users\admin\.windows-build-tools and is owned by the admin user. The python config variable of npm is set to that path, which results in npm not finding python (even if python was installed earlier).
Would it be possible to have windows-build-tools install Python globally, so all users can access it?
That's a good idea, I'm generally for that.
Just to make sure I understand, you're saying that it's OK to require admin privileges during the installation (otherwise it shouldn't be possible to install system-wide packages), but that Python should be installed in, say, %programfiles%\Python27 (possibly only when this behavior is specified via command-line argument). So then I think we'd need to make a few changes:
- Add command-line switch to trigger this behavior
- Check switch and either modify
TARGETDIR=...or remove it and setALLUSERS=1(the latter is presumably preferred) - Update doc, e.g.
README.mdnotes about Python installation location
This might also be a good time to investigate the problem of inadvertently uninstalling pre-existing Python installations
I would definitely prefer not having to provide admin privileges at all, but the more immediate problem for us was a non-accessible Python installation.
And i assumed installing msbuild without admin permissions wasn't an option. If it turns out that it is, yay :)