{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/vcpkg/issues/983","repository_url":"https://api.github.com/repos/Microsoft/vcpkg","labels_url":"https://api.github.com/repos/Microsoft/vcpkg/issues/983/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vcpkg/issues/983/comments","events_url":"https://api.github.com/repos/Microsoft/vcpkg/issues/983/events","html_url":"https://github.com/Microsoft/vcpkg/issues/983","id":224407749,"number":983,"title":"bootstrap-vcpkg.bat failed if Windows Kits not in %PROGRAMFILES% path","user":{"login":"Banzai292","id":1905750,"avatar_url":"https://avatars3.githubusercontent.com/u/1905750?v=3","gravatar_id":"","url":"https://api.github.com/users/Banzai292","html_url":"https://github.com/Banzai292","followers_url":"https://api.github.com/users/Banzai292/followers","following_url":"https://api.github.com/users/Banzai292/following{/other_user}","gists_url":"https://api.github.com/users/Banzai292/gists{/gist_id}","starred_url":"https://api.github.com/users/Banzai292/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Banzai292/subscriptions","organizations_url":"https://api.github.com/users/Banzai292/orgs","repos_url":"https://api.github.com/users/Banzai292/repos","events_url":"https://api.github.com/users/Banzai292/events{/privacy}","received_events_url":"https://api.github.com/users/Banzai292/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-26T09:47:22Z","updated_at":"2017-04-26T09:47:22Z","closed_at":null,"body":"I've a problem to build vcpkg on Windows 7 with VS2012/2015 and 2017. Executing bootstrap-vcpkg.bat results in:\r\n\r\n> Could not detect a Windows SDK / TargetPlatformVersion\r\n\r\nOn my system the \"Windows Kits\" are not in the %PROGRAMFILES% path, because I've installed much more on my \"D:\\Program Files...\" folder (my C:-SSD runs out of space).\r\n\r\nFor my personal solution I've added a new PowerShell script for examine the registry, where the \"Windows Kits\" have a own entry (see HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots).\r\n\r\nAlso I modfied the bootstrap.ps1 to get these path.\r\n\r\nThis works for me and build vcpkg.exe successfully!\r\n\r\nPlease have a look and maybe merge my solution to the repository. It's NOT tested on other Windows versions nor VC installations!!!\r\n\r\n`bootstrap-vcpkg.ps1 Line 20: $CandidateProgramFiles = $(& $scriptsDir\\getProgramFiles32bit.ps1), $(& $scriptsDir\\getProgramFilesPlatformBitness.ps1), $(& $scriptsDir\\getKitsRootFromRegistry.ps1)`\r\n\r\nScript 'getKitsRootFromRegistry':\r\n`[CmdletBinding()]\r\nparam(\r\n\r\n)\r\n\r\n$key = \"Registry::HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots\"\r\n$kit = (Get-ItemProperty -Path $key -Name \"KitsRoot\").KitsRoot\r\n$out = (Split-Path (Split-Path $kit -Parent) -Parent)\r\n\r\nif ($out -eq $null)\r\n{\r\n    throw \"Could not find [KitsRoot]\"\r\n}\r\n\r\nreturn $out`\r\n"}}
{"actor":{"display_login":"Banzai292"}}