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

problem bootstrapping vcpkg as 'system' user (SysWOW64 issue) #5248

Closed
daef opened this issue Jan 28, 2019 · 4 comments
Closed

problem bootstrapping vcpkg as 'system' user (SysWOW64 issue) #5248

daef opened this issue Jan 28, 2019 · 4 comments
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed

Comments

@daef
Copy link
Contributor

daef commented Jan 28, 2019

I'm trying to bootstrap vcpkg as 'Local System' (from a service) - which fails.

It looks like SysWOW64 redirection is messing things up: dotnet/msbuild#185

Is there any way to use msbuild64 or override env:TMP for the bootstrap process?
(cleanEnvironmentHelper.ps1 seems to undo any environmental changes I try)

edit: removed troubleshooting comments, crossposted issue to dotnet/msbuild#4107

@daef daef changed the title problem bootstrapping vcpkg as 'system' user problem bootstrapping vcpkg as 'system' user (SysWOW64 issue) Jan 29, 2019
@ras0219-msft ras0219-msft added the category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed label Jan 30, 2019
@ras0219-msft
Copy link
Contributor

Thanks for posting this issue!

Looking at your comments in the other thread, it seems like the right answer is for us to detect if we are running as the system user and perhaps change the temp environment variable accordingly.

I'd be happy to review a PR for such a feature!

@damian123
Copy link

damian123 commented Mar 5, 2019

Git hash: c7d4696

Here is a build log that might explain why it does not work, and possibly juggle the brains on someone so this issue can get fixed. Thanks in advance!!
build.txt

To get this log file I had to do the following:

  1. Open a command prompt with admin rights
  2. Open a command prompt with the nt authority\system user: psexec -i -s cmd.exe
  3. git clone https://github.com/Microsoft/vcpkg.git
  4. "c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvars64.bat"
  5. Edit bootstrap.ps1 to "/verbosity:diag",
  6. bootstrap-vcpkg.bat -verbose >c:\temp\build.txt

johnzhuacl pushed a commit to johnzhuacl/vcpkg that referenced this issue Jun 25, 2019
If we keep TMP, when run as 'system' user it is using Windows\Temp folder.
@johnzhuacl
Copy link
Contributor

Looks like keep TMP in cleanEnvironmentHelper.ps1 solve the problem. I am able to build vcpkg in Jenkins which is running under 'nt authority\system`

ras0219-msft pushed a commit that referenced this issue Jun 26, 2019
If we keep TMP, when run as 'system' user it is using Windows\Temp folder.
pull bot pushed a commit to harrysummer/vcpkg that referenced this issue Jun 26, 2019
If we keep TMP, when run as 'system' user it is using Windows\Temp folder.
@LilyWangL
Copy link
Contributor

Thanks for posting this issue. This issue has been fixed. So I am closing this issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed
Projects
None yet
Development

No branches or pull requests

5 participants