{"id":5866,"date":"2017-10-12T20:45:07","date_gmt":"2017-10-13T03:45:07","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/heaths\/?p=3866"},"modified":"2019-02-17T15:29:15","modified_gmt":"2019-02-17T22:29:15","slug":"new-vswhere-with-more-properties","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/setup\/new-vswhere-with-more-properties\/","title":{"rendered":"New vswhere: now with more properties!"},"content":{"rendered":"<p>The <a href=\"https:\/\/github.com\/Microsoft\/vswhere\/releases\/latest\">latest release<\/a> of <i>vswhere<\/i> now outputs additional properties as <a href=\"https:\/\/github.com\/Microsoft\/vswhere\/issues\/104\">requested<\/a>, along with catalog properties and a way to disambiguate nested properties &#8211; not that there are any currently. You can specify the nested properties followed by a property name like &#8220;properties\/nickname&#8221;. Delimiters supported are &#8220;_&#8221;, &#8220;\/&#8221;, and &#8220;.&#8221; to fit with the text, JSON, and XML formats. You can use any delimiter with any format, however.<\/p>\n<p>The default output for an instance now looks like:<\/p>\n<pre class=\"lang:js decode:true \">[\r\n  {\r\n    \"instanceId\": \"890353f3\",\r\n    \"installDate\": \"2017-09-16T01:24:28Z\",\r\n    \"installationName\": \"VisualStudio\/15.4.0+27004.2002\",\r\n    \"installationPath\": \"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2017\\\\Enterprise\",\r\n    \"installationVersion\": \"15.4.27004.2002\",\r\n    \"productId\": \"Microsoft.VisualStudio.Product.Enterprise\",\r\n    \"productPath\": \"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2017\\\\Enterprise\\\\Common7\\\\IDE\\\\devenv.exe\",\r\n    \"isPrerelease\": false,\r\n    \"displayName\": \"Visual Studio Enterprise 2017\",\r\n    \"description\": \"Microsoft DevOps solution for productivity and coordination across teams of any size\",\r\n    \"channelId\": \"VisualStudio.15.Release\",\r\n    \"channelPath\": \"C:\\\\Users\\\\heaths\\\\AppData\\\\Local\\\\Microsoft\\\\VisualStudio\\\\Packages\\\\_Channels\\\\4CB340F5\\\\catalog.json\",\r\n    \"channelUri\": \"https:\/\/aka.ms\/vs\/15\/release\/channel\",\r\n    \"enginePath\": \"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\Installer\\\\resources\\\\app\\\\ServiceHub\\\\Services\\\\Microsoft.VisualStudio.Setup.Service\",\r\n    \"releaseNotes\": \"https:\/\/go.microsoft.com\/fwlink\/?LinkId=660692#15.4.0\",\r\n    \"thirdPartyNotices\": \"https:\/\/go.microsoft.com\/fwlink\/?LinkId=660708\",\r\n    \"catalog\": {\r\n      \"buildBranch\": \"d15svc\",\r\n      \"buildVersion\": \"15.4.27004.2002\",\r\n      \"id\": \"VisualStudio\/15.4.0+27004.2002\",\r\n      \"localBuild\": \"build-lab\",\r\n      \"manifestName\": \"VisualStudio\",\r\n      \"manifestType\": \"installer\",\r\n      \"productDisplayVersion\": \"15.4.0\",\r\n      \"productLine\": \"Dev15\",\r\n      \"productLineVersion\": \"2017\",\r\n      \"productMilestone\": \"RTW\",\r\n      \"productMilestoneIsPreRelease\": \"False\",\r\n      \"productName\": \"Visual Studio\",\r\n      \"productPatchVersion\": \"0\",\r\n      \"productPreReleaseMilestoneSuffix\": \"6.0\",\r\n      \"productRelease\": \"RTW\",\r\n      \"productSemanticVersion\": \"15.4.0+27004.2002\"\r\n    },\r\n    \"properties\": {\r\n      \"campaignId\": \"844478574.1505524861\",\r\n      \"channelManifestId\": \"VisualStudio.15.Release\/15.4.0+27004.2002\",\r\n      \"nickname\": \"\",\r\n      \"setupEngineFilePath\": \"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\Installer\\\\vs_installershell.exe\"\r\n    }\r\n  }\r\n]<\/pre>\n<p>Most of the properties are provided through the <code>ISetupPropertyStore<\/code>. This interface is implemented by <code>ISetupInstance<\/code> objects, and provided by <code>ISetupInstance2::GetProperties<\/code> for custom properties. Starting with Visual Studio 2017 Update 3, you can also get catalog properties by calling <code>IUnknown::QueryInterface<\/code> on an <code>ISetupInstance<\/code> object for <code>ISetupInstanceCatalog<\/code>, which also provides an <code>ISetupPropertyStore<\/code> from <code>ISetupInstanceCatalog::GetProperties<\/code>. As we add new features that require persisting properties, they will automatically be exposed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Read about all the new properties output by vswhere.<\/p>\n","protected":false},"author":389,"featured_media":15101,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[20,45,57,60],"class_list":["post-5866","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-installation","tag-visual-studio","tag-vs2017","tag-vswhere"],"acf":[],"blog_post_summary":"<p>Read about all the new properties output by vswhere.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/5866","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/users\/389"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/comments?post=5866"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/5866\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/media\/15101"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/media?parent=5866"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/categories?post=5866"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/tags?post=5866"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}