{"action":"created","issue":{"url":"https://api.github.com/repos/chocolatey/choco/issues/699","repository_url":"https://api.github.com/repos/chocolatey/choco","labels_url":"https://api.github.com/repos/chocolatey/choco/issues/699/labels{/name}","comments_url":"https://api.github.com/repos/chocolatey/choco/issues/699/comments","events_url":"https://api.github.com/repos/chocolatey/choco/issues/699/events","html_url":"https://github.com/chocolatey/choco/issues/699","id":149768923,"number":699,"title":"Install-ChocolateyPath updates PATH to REG_SZ, which may break using Windows dir and system32 tools","user":{"login":"ferventcoder","id":63502,"avatar_url":"https://avatars.githubusercontent.com/u/63502?v=3","gravatar_id":"","url":"https://api.github.com/users/ferventcoder","html_url":"https://github.com/ferventcoder","followers_url":"https://api.github.com/users/ferventcoder/followers","following_url":"https://api.github.com/users/ferventcoder/following{/other_user}","gists_url":"https://api.github.com/users/ferventcoder/gists{/gist_id}","starred_url":"https://api.github.com/users/ferventcoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ferventcoder/subscriptions","organizations_url":"https://api.github.com/users/ferventcoder/orgs","repos_url":"https://api.github.com/users/ferventcoder/repos","events_url":"https://api.github.com/users/ferventcoder/events{/privacy}","received_events_url":"https://api.github.com/users/ferventcoder/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chocolatey/choco/labels/2%20-%20Working","name":"2 - Working","color":"CCCCCC"},{"url":"https://api.github.com/repos/chocolatey/choco/labels/Bug","name":"Bug","color":"fc2929"},{"url":"https://api.github.com/repos/chocolatey/choco/labels/Priority_HIGH","name":"Priority_HIGH","color":"e11d21"}],"state":"open","locked":false,"assignee":{"login":"ferventcoder","id":63502,"avatar_url":"https://avatars.githubusercontent.com/u/63502?v=3","gravatar_id":"","url":"https://api.github.com/users/ferventcoder","html_url":"https://github.com/ferventcoder","followers_url":"https://api.github.com/users/ferventcoder/followers","following_url":"https://api.github.com/users/ferventcoder/following{/other_user}","gists_url":"https://api.github.com/users/ferventcoder/gists{/gist_id}","starred_url":"https://api.github.com/users/ferventcoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ferventcoder/subscriptions","organizations_url":"https://api.github.com/users/ferventcoder/orgs","repos_url":"https://api.github.com/users/ferventcoder/repos","events_url":"https://api.github.com/users/ferventcoder/events{/privacy}","received_events_url":"https://api.github.com/users/ferventcoder/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/chocolatey/choco/milestones/2","html_url":"https://github.com/chocolatey/choco/milestones/0.9.10","labels_url":"https://api.github.com/repos/chocolatey/choco/milestones/2/labels","id":945326,"number":2,"title":"0.9.10","description":"","creator":{"login":"ferventcoder","id":63502,"avatar_url":"https://avatars.githubusercontent.com/u/63502?v=3","gravatar_id":"","url":"https://api.github.com/users/ferventcoder","html_url":"https://github.com/ferventcoder","followers_url":"https://api.github.com/users/ferventcoder/followers","following_url":"https://api.github.com/users/ferventcoder/following{/other_user}","gists_url":"https://api.github.com/users/ferventcoder/gists{/gist_id}","starred_url":"https://api.github.com/users/ferventcoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ferventcoder/subscriptions","organizations_url":"https://api.github.com/users/ferventcoder/orgs","repos_url":"https://api.github.com/users/ferventcoder/repos","events_url":"https://api.github.com/users/ferventcoder/events{/privacy}","received_events_url":"https://api.github.com/users/ferventcoder/received_events","type":"User","site_admin":false},"open_issues":23,"closed_issues":101,"state":"open","created_at":"2015-01-21T14:31:39Z","updated_at":"2016-05-03T20:11:34Z","due_on":null,"closed_at":null},"comments":13,"created_at":"2016-04-20T13:33:46Z","updated_at":"2016-05-05T13:45:25Z","closed_at":null,"body":"The fixes for #303 had an interesting and terrible side effect. When you don't expand the value and then you update using `[Environment]::SetEnvironmentVariable($Name, $Value, $Scope)`, it has the side effect of overwriting the original registry value type and saves the values as `REG_SZ` instead of keeping it as `REG_EXPAND_SZ`. Then all of those tools in WinDir no longer work all of a sudden and it's somewhat perplexing what happened as everything looks appropriate when you inspect the values.\r\n\r\nThe offending commit is e050c2259163232c44a4c4a2aaf6c37b11f86e7e\r\n\r\nYou will know you are affected if you open a new command line and type `where.exe choco` and the system cannot find where.exe.\r\n\r\n***UPDATE:*** This would ONLY affect you if you installed the beta versions directly without upgrading to them. Previous versions of Chocolatey would have already expanded the values in `PATH` and saved it as `REG_SZ`. The bug that #303 fixes is saving you from this issue.\r\n\r\nWhen you install Chocolatey, it will set itself in the PATH using `Install-ChocolateyPath`. This is the only time you could be affected by this issue, and only if you installed (not upgraded) an affected version directly. Otherwise the variables would have been expanded and your PATH would continue to work. #303 introduced not expanding the PATH, which causes this issue because you get both not expanding those variables AND switching it to `REG_SZ` (which it was already doing).\r\n\r\n### Original\r\n\r\nhttps://github.com/chocolatey/choco/compare/7b0de8f...9b6946a\r\n\r\nI haven't found it yet, but it causes Vagrant 1.8.1 to get to the next shell runner and never move forward. \r\n\r\n\r\nOnce I have more details on why I will reach out to the Vagrant folks if necessary.\r\n\r\n~~~sh\r\n==> default:\r\n==> default: DEBUG: Add-ChocolateyProfile\r\n==> default: DEBUG: Creating 'C:\\Users\\Administrator\\Documents\\WindowsPowerShell'\r\n==> default: DEBUG: Creating\r\n==> default: 'C:\\Users\\Administrator\\Documents\\WindowsPowerShell\\Microsoft.PowerShell_profil\r\n==> default: e.ps1'\r\n==> default: Adding Chocolatey to the profile. This will provide tab completion, refreshenv, etc.\r\n==> default: WARNING: Chocolatey profile installed. Reload your profile - type . $profile\r\n==> default: DEBUG: Install-DotNet4IfMissing called with $forceFxInstall=False\r\n==> default: Chocolatey (choco.exe) is now ready.\r\n==> default: You can call choco from anywhere, command line or powershell by typing choco.\r\n==> default: Run choco /? for a list of functions.\r\n==> default: You may need to shut down and restart powershell and/or consoles\r\n==> default:  first prior to using choco.\r\n==> default: DEBUG: Remove-OldChocolateyInstall\r\n==> default: Ensuring chocolatey commands are on the path\r\n==> default: Ensuring chocolatey.nupkg is in the lib folder\r\n==> default: Chocolatey v0.9.10-beta1-281-gfd2eea1\r\n==> default: autoUninstaller was enabled by default. Explicitly setting value.\r\n==> default: Enabled autoUninstaller\r\n==> default: Chocolatey v0.9.10-beta1-281-gfd2eea1\r\n==> default: Enabled allowGlobalConfirmation\r\n==> default: Chocolatey v0.9.10-beta1-281-gfd2eea1\r\n==> default: Enabled logEnvironmentValues\r\n\r\n==> default: Running provisioner: shell...\r\n~~~\r\n\r\nIt finishes the install of Chocolatey, and then when it goes to run the next provisioner, it just sits there. I've confirmed it in several places."},"comment":{"url":"https://api.github.com/repos/chocolatey/choco/issues/comments/217158137","html_url":"https://github.com/chocolatey/choco/issues/699#issuecomment-217158137","issue_url":"https://api.github.com/repos/chocolatey/choco/issues/699","id":217158137,"user":{"login":"ferventcoder","id":63502,"avatar_url":"https://avatars.githubusercontent.com/u/63502?v=3","gravatar_id":"","url":"https://api.github.com/users/ferventcoder","html_url":"https://github.com/ferventcoder","followers_url":"https://api.github.com/users/ferventcoder/followers","following_url":"https://api.github.com/users/ferventcoder/following{/other_user}","gists_url":"https://api.github.com/users/ferventcoder/gists{/gist_id}","starred_url":"https://api.github.com/users/ferventcoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ferventcoder/subscriptions","organizations_url":"https://api.github.com/users/ferventcoder/orgs","repos_url":"https://api.github.com/users/ferventcoder/repos","events_url":"https://api.github.com/users/ferventcoder/events{/privacy}","received_events_url":"https://api.github.com/users/ferventcoder/received_events","type":"User","site_admin":false},"created_at":"2016-05-05T13:45:25Z","updated_at":"2016-05-05T13:45:25Z","body":"And I think you are going to like the fixes I put in, we are addressing ensuring PATH is expand string."}}