{"id":2353,"date":"2013-12-17T07:00:00","date_gmt":"2013-12-17T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2013\/12\/17\/why-doesnt-the-new-folder-command-work-in-the-root-of-a-redirected-drive-resource-in-a-remote-desktop-session\/"},"modified":"2013-12-17T07:00:00","modified_gmt":"2013-12-17T07:00:00","slug":"why-doesnt-the-new-folder-command-work-in-the-root-of-a-redirected-drive-resource-in-a-remote-desktop-session","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20131217-00\/?p=2353","title":{"rendered":"Why doesn&#039;t the New Folder command work in the root of a redirected drive resource in a Remote Desktop session?"},"content":{"rendered":"<p>When you connect to another computer via Remote Desktop, you have the option of injecting your local drives into the remote computer, known as <a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/cc725887%28v=WS.10%29.aspx\"> Device and Resource Redirection<\/a>. These injected drives are available under the UNC <code>\\\\tsclient\\X<\/code> where X is a drive letter on the local machine.\n The name <code>TSCLIENT<\/code> combines a bunch of internal technical terminology, so it makes perfect sense to the people who wrote it, but not as much to outsiders. (They may have chosen this name <a href=\"http:\/\/blogs.msdn.com\/b\/oldnewthing\/archive\/2004\/04\/26\/120193.aspx\"> just to make themselves look smart<\/a>.) The letters TS stand for Terminal Services, which was the former name of the technology now known as Remote Desktop. And the word <i>client<\/i> refers to the local computer, the one that is connected to the remote computer. In Terminal Services terminology, the machine you are connect from is the client, and the machine you are connecting to is the server.\n There&#8217;s another level of confusion in the name of the feature. People often call these <code>\\\\tsclient\\X<\/code> thingies <i>Redirected Drives<\/i>, which collides with the <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/ms685143%28v=vs.85%29.aspx\"> existing name<\/a> for local drive letters that have been mapped to a network resource. In the user interface, these are usually called <i>Mapped Network Drives<\/i>. From the command line, you create these things via the <code>NET USE<\/code> command.\n Okay, enough with the confusing terminology. For today, we&#8217;re talking about Remote Desktop Device Redirection, where the redirected device is a drive letter.\n If you open <i>My Computer<\/i> and look under <i>Other<\/i>, you&#8217;ll see those drives which were injected from the local computer. Your first tip-off that there&#8217;s something funny about these drives: They don&#8217;t show up in the <i>Network Location<\/i> section like other mapped drives; instead they show up under the rather generic-sounding <i>Other<\/i>.\n That&#8217;s because these drives aren&#8217;t really drives. They are <i>folder shortcuts<\/i>, a special type of shortcut that grafts one part of the shell namespace into another. The ones created by Remote Desktop Device Redirection are <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms997573.aspx\"> <i>shell instance objects<\/i><\/a>, which is a way of creating certain types of shell extensions using just a handful of registry keys.\n Since they aren&#8217;t really drives, some things that work for real drives don&#8217;t work for these fake drives. And one of those things is that Explorer thinks that they don&#8217;t support the <i>New Folder<\/i> command because when Explorer asks, &#8220;Do you support <i>IStorage<\/i>?&#8221; (because that&#8217;s the interface that Explorer uses to create new folders), the answer is &#8220;No, you silly rabbit. I&#8217;m an <i>Other<\/i>!&#8221;\n Now, it turns out that the Terminal Services folks could&#8217;ve customized their <i>Other<\/i> to say, &#8220;Actually, yeah, I do support <i>IStorage<\/i>.&#8221; You do this by setting the bit <code>0x00000008<\/code> in the <code>Attributes<\/code> value of the <code>ShellFolder<\/code> key when you registered your instance object. The Terminal Services folks forgot to set that bit, and the result is no <i>New Folder<\/i> button.\n Sorry about that.<\/p>\n<p> As a workaround, you can create your new folder by typing <code>\\\\tsclient\\X<\/code> into the address bar. That folder is the thing that the folder shortcut is pointing to (so it&#8217;s just another name for the same thing), but since it&#8217;s the real thing, it correctly reports the <code>SFGAO_STORAGE<\/code> flag, and the <i>New Folder<\/i> button appears. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you connect to another computer via Remote Desktop, you have the option of injecting your local drives into the remote computer, known as Device and Resource Redirection. These injected drives are available under the UNC \\\\tsclient\\X where X is a drive letter on the local machine. The name TSCLIENT combines a bunch of internal [&hellip;]<\/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":[104],"class_list":["post-2353","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-tipssupport"],"acf":[],"blog_post_summary":"<p>When you connect to another computer via Remote Desktop, you have the option of injecting your local drives into the remote computer, known as Device and Resource Redirection. These injected drives are available under the UNC \\\\tsclient\\X where X is a drive letter on the local machine. The name TSCLIENT combines a bunch of internal [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/2353","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=2353"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/2353\/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=2353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=2353"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=2353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}