{"id":91871,"date":"2015-11-02T07:00:00","date_gmt":"2015-11-02T22:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/20151102-00\/?p=91871\/"},"modified":"2019-03-13T12:21:16","modified_gmt":"2019-03-13T19:21:16","slug":"20151102-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20151102-00\/?p=91871","title":{"rendered":"How can I make my custom namespace extension get categorized correctly in My Computer?"},"content":{"rendered":"<p>A customer was developing a custom namespace extension and they found that when displayed in My Computer, it showed up in the <i>Other<\/i> category. <\/p>\n<table BORDER=\"1\" CELLPADDING=\"0\" CELLSPACING=\"0\" STYLE=\"background-color: white\">\n<tr>\n<td>\n<table BORDER=\"0\" CELLPADDING=\"2\" CELLSPACING=\"0\" STYLE=\"font-family: Tahoma, sans-serif;font-size: 10pt\">\n<tr>\n<td STYLE=\"border-bottom: solid 1px #808080\" COLSPAN=\"3\">Name<\/td>\n<td STYLE=\"border-bottom: solid 1px #808080\">Type<\/td>\n<\/tr>\n<tr>\n<td VALIGN=\"middle\"><font SIZE=\"+1\">&#x25e2;<\/font><\/td>\n<td COLSPAN=\"3\"><font SIZE=\"+1\">Hard Disk Drives (3)<\/font><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td ALIGN=\"center\">&#x23cd;<\/td>\n<td>OS (C:)<\/td>\n<td>Local Disk<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td ALIGN=\"center\">&#x23cd;<\/td>\n<td>DISK_1 (E:)<\/td>\n<td>Local Disk<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td ALIGN=\"center\">&#x23cd;<\/td>\n<td>DISK_2 (F:)<\/td>\n<td>Local Disk<\/td>\n<\/tr>\n<tr>\n<td VALIGN=\"middle\"><font SIZE=\"+1\">&#x25e2;<\/font><\/td>\n<td COLSPAN=\"3\"><font SIZE=\"+1\">Devices with Removable Storage (1)<\/font><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td ALIGN=\"center\">&#x2609;<\/td>\n<td>DVD RW Drive (D:)<\/td>\n<td>CD Drive<\/td>\n<\/tr>\n<tr>\n<td VALIGN=\"middle\"><font SIZE=\"+1\">&#x25e2;<\/font><\/td>\n<td COLSPAN=\"3\"><font SIZE=\"+1\">Network Locations (1)<\/font><\/td>\n<\/tr>\n<tr>\n<tr>\n<td><\/td>\n<td ALIGN=\"center\">&#x23db;<\/td>\n<td>share (\\\\server) (Z:)<\/td>\n<td>Network Drive<\/td>\n<\/tr>\n<tr>\n<td VALIGN=\"middle\"><font SIZE=\"+1\">&#x25e2;<\/font><\/td>\n<td COLSPAN=\"3\"><font SIZE=\"+1\">Other (1)<\/font><\/td>\n<\/tr>\n<tr>\n<tr>\n<td STYLE=\"color: red\">&rarr;<\/td>\n<td ALIGN=\"center\">&#x23da;<\/td>\n<td>NAS Device<\/td>\n<td>System Folder<\/td>\n<\/tr>\n<\/table>\n<\/td>\n<\/tr>\n<\/table>\n<p>They wanted it to appear in the <i>Network Locations<\/i> category because it represented a network device. <\/p>\n<p>Explorer categorizes the items based on the <code>SH&shy;DESCRIPTION&shy;ID.dwDescription&shy;Id<\/code>. We saw this structure some time ago when we tried to <a HREF=\"http:\/\/blogs.msdn.com\/b\/oldnewthing\/archive\/2008\/09\/18\/8956382.aspx\">detect the Recycle Bin<\/a>. By default shell namespace extensions are given <code>SHDID_COMPUTER_OTHER<\/code> as their description ID and the <code>clsid<\/code> is the class ID of the shell extension itself. <\/p>\n<p>To customize the description ID, go to the shell namespace registration and add the following: <\/p>\n<pre>\nHKEY_CLASSES_ROOT\\\n    CLSID\\\n        {clsid}\\\n            DescriptionID=REG_DWORD:9\n<\/pre>\n<p>The magic number 9 is <code>SHDID_COMPUTER_NET&shy;DRIVE<\/code>. You can use any of the values supported by <a HREF=\"https:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/bb759775(v=vs.85).aspx\">the <code>SH&shy;DESCRIPTION&shy;ID<\/code> structure<\/a>. For example, if your shell extension wraps a file system directory, you may want to use <code>SHDID_FS_DIRECTORY<\/code> so that it gets categorized under <i>Folders<\/i>. <\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Give it the appropriate description ID.<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-91871","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>Give it the appropriate description ID.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/91871","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=91871"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/91871\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=91871"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=91871"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=91871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}