{"id":195,"date":"2007-04-19T08:33:14","date_gmt":"2007-04-19T07:33:14","guid":{"rendered":"http:\/\/www.itwriting.com\/blog\/?p=195"},"modified":"2007-04-19T08:33:14","modified_gmt":"2007-04-19T07:33:14","slug":"a-bug-in-vistas-uac","status":"publish","type":"post","link":"https:\/\/www.itwriting.com\/blog\/195-a-bug-in-vistas-uac.html","title":{"rendered":"A bug in Vista&#8217;s UAC"},"content":{"rendered":"<p>Vista&#8217;s User Account Control (UAC) elevation prompt sometimes appears when it shouldn&#8217;t. Here is an example which works every time for me. I have a folder in Documents (within my home directory) called recordings, containing MP3 files. I double-click one of these files and it opens in Windows Media Player. Now let&#8217;s say I try to rename the recordings folder. I get a dialog saying I need to confirm this operation, complete with a UAC shield. <\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.itwriting.com\/images\/uacerror1.gif\"> <\/p>\n<p>I click Continue and get the screen flash and the elvation prompt. It&#8217;s not enough though; I now get a dialog that says &#8220;Destination Folder Access Denied &#8211; You need permission to perform this action.&#8221; If I click Try Again, I get the same dialog, for ever.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.itwriting.com\/images\/uacerror2.gif\"> <\/p>\n<p>It&#8217;s nonsense of course. I don&#8217;t need permission; I need to close the MP3 file. Indeed, if I close the file I can then rename the folder.<\/p>\n<p>Oddly, if I try this with a Word document, Vista correctly reports that the folder in in use by Word. But if I try a second time, I get the inappropriate UAC prompt.<\/p>\n<p>It&#8217;s possible&nbsp;that some Windows API call is returning an access denied error, when it should indicate a file or folder in use by another process, or there could be some other explanation. The end result is a poor user experience.<\/p>\n<p>If Microsoft can&#8217;t always get this right, it illustrates how hard it is for developers to give users appropriate error messages when working with UAC on Vista.<\/p>\n<p>&nbsp;<\/p>\n<div class=\"wlWriterSmartContent\" id=\"0767317B-992E-4b12-91E0-4F059A8CECA8:fd02f407-4f7b-40c7-ab28-2faf0b39e322\" contenteditable=\"false\" style=\"padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px\">Technorati tags: <a href=\"http:\/\/technorati.com\/tags\/uac\" rel=\"tag\">uac<\/a>, <a href=\"http:\/\/technorati.com\/tags\/vista\" rel=\"tag\">vista<\/a>, <a href=\"http:\/\/technorati.com\/tags\/elevation\" rel=\"tag\">elevation<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Vista&#8217;s User Account Control (UAC) elevation prompt sometimes appears when it shouldn&#8217;t. Here is an example which works every time for me. I have a folder in Documents (within my home directory) called recordings, containing MP3 files. I double-click one of these files and it opens in Windows Media Player. Now let&#8217;s say I try &hellip; <a href=\"https:\/\/www.itwriting.com\/blog\/195-a-bug-in-vistas-uac.html\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">A bug in Vista&#8217;s UAC<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[80,97],"tags":[],"class_list":["post-195","post","type-post","status-publish","format-standard","hentry","category-software-development","category-windows"],"_links":{"self":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts\/195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/comments?post=195"}],"version-history":[{"count":0,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts\/195\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/media?parent=195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/categories?post=195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/tags?post=195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}