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

Environment variable update fixes #840

Closed
3 tasks done
ferventcoder opened this issue Jun 29, 2016 · 5 comments
Closed
3 tasks done

Environment variable update fixes #840

ferventcoder opened this issue Jun 29, 2016 · 5 comments

Comments

@ferventcoder
Copy link
Member

ferventcoder commented Jun 29, 2016

Related to #532 and #826.

It appears that there are issues with the TEMP environment variable when using alternative sources. Ensure that environment variables are set appropriately before calling alternative sources like WindowsFeatures.

  • ensure items are set prior to calling alternative sources
  • Set the TMP variable to config.CacheLocation as well
  • Do not set user variables for SYSTEM user
@ferventcoder ferventcoder added this to the 0.9.10.4 milestone Jun 29, 2016
@ferventcoder ferventcoder self-assigned this Jun 29, 2016
@Q2-Azure-Infrastructure

Rob, do you know of any workaround I could put in my PS script? I tried both refreshenv after installing choco and manually setting the $env:TEMP folder before installing the dism package but no go in either case.

@ferventcoder
Copy link
Member Author

@Q2-Azure-Infrastructure I've marked the priority high on this. I think you could just use DISM directly and get around this for now. That or create a junction/symlink from the folder it wants back to C:\Windows\TEMP for now.

@eric-swann-q2
Copy link

Thanks Rob, I was able to work around this in the short term by backing out to 0.9.10.2 and manually setting the cache location.

@ferventcoder
Copy link
Member Author

@eric-swann-q2 so wait, 0.9.10.2 does not have this issue but 0.9.10.3 does? I'm not sure what would have changed to cause it versus fixing it...

@eric-swann-q2
Copy link

Yes, correct...I remembered it working for me in 0.9.10.2, so I dialed back and manually put in the cache location (to account for the fix you added in 0.9.10.3) and it now successfully installs windows features. Perhaps the cache fix (or some other) inadvertently caused this. Not really sure, but yes it definitely doesn't install windows features in 10.3 and definitely does in 10.2

@ferventcoder ferventcoder changed the title Ensure environment variables are set/updated prior to calling alternative sources Environment variable update enhancements Aug 9, 2016
@ferventcoder ferventcoder changed the title Environment variable update enhancements Environment variable update fixes Aug 9, 2016
ferventcoder added a commit that referenced this issue Aug 10, 2016
If the user is Local System, do not set user environment variables.
Typically SYSTEM only looks at machine environment variables, so we
need to emulate that same behavior to ensure we are not setting values
that are incorrect.
ferventcoder added a commit that referenced this issue Aug 10, 2016
* stable: (23 commits)
  (GH-897) Fix DISM /all for newer Windows versions
  (maint) bring back in nuspec into solution folders
  (GH-598) Add output directory for choco pack
  (version) bump to 0.10.0
  (doc) update CHANGELOG/nuspec
  (GH-840) Do not set User Environment for SYSTEM
  (GH-840) Set TMP to cacheLocation as well
  (GH-830) Ensure process PSModulePath items
  (GH-112) Relax HTTPS checksum failure
  (maint) move noop run
  (GH-833) Don't set profile under certain conditions
  (doc) update generated docs
  (GH-112) update options for new version
  (GH-112) Checksums / Install Template
  (GH-112) Update parameter documentation
  (GH-112) Require checksums
  (GH-112) Allow Empty Checksums
  (GH-112) Checksum remote files unless checksum
  (GH-112) Allow user passed checksums
  (GH-112) rename checksum files for proper casing
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants