First Vista UAC problem

by matt 24. November 2006 09:25

I've been using Vista for a good few weeks now, and it's only today that I've hit my first UAC problem - you can't "unblock" a file that's been marked as downloaded if you don't have full permissions to it.

Internet Explorer has a feature called Persistent Zone Identifier. When you download a file from a site, the file saved to the hard disk is marked with the site's security zone (e.g. Internet Zone). When you try and run that program, the shell will notice the identifier and display a warning that you are trying to run a file from an untrusted source. It's a nice little security feature.

XP took it a step further. If you have a zip file with a persistent zone identifier, XP's built in zip tool would pass the identifier on to the files it extracted, so any executables you downloaded in a zip file were still subject to the same zone check. Defence in depth.

Vista appears to trump XP. It not only keeps the id for extracted files, but appears to apply it to any files created by a program that is marked with a zone id!

I downloaded a zip file containing a setup program. I extracted it with the built in zip tool (or maybe I just double clicked the setup program while inside the zip folder view, I forget which) and installed the program. It starts up as you log in, and suddenly I'm greeted by the warning dialog - I'm trying to run software downloaded from the internet.

To stop the dialogs, you can do one of two things; uncheck the tick box on the warning itself, or display the executable file's properties and click "unblock". Neither of which work if you're running with UAC and the files are installed to Program Files, and neither option prompts you for elevation. It silently fails. And you can't elevate explorer itself while browsing the folder, so you're kind of stuffed. And running the file elevated gets the warning prompt before the elevation prompt (it runs in explorer's context, so you've got no hope).

But where there's a will, there's a way. This rather useful runmenu tool allows you to run the following command from an elevated command prompt:

runmenu /verb:properties /wait:window file.exe

and you get the file properties dialog open and can successfully unblock the file. (The "wait" is very important)

Msdn has more details about the Persistent Zone Identifier, but it doesn't mention the little tidbit that the identifier is stored in an NTFS stream called "ZoneIdentifier".

Tags:

Vista

Comments

4/22/2008 10:00:20 PM #

Sniffer

RE: First Vista UAC problem

Perfect, perfect, perfect!!!!! You're a genious!

Sniffer | Reply

9/25/2008 8:05:35 AM #

RE: First Vista UAC problem

UAC was about to drive me bonkers! After reading your article I took a different approach that I've used before under Windows XP to have an "explorer" window running under a different user id: I ran a 3rd-party file manager. I ran A43 as Admin and was able to access the properties dialog from there. Thanks!

A43 is at http://www.primitus.us/a43/ , but any 3rd-party shell should do.

I bet there's a command-line way to unblock or certainly a Powershell command. I'll find it eventually.

Jim | Reply

12/4/2008 5:00:30 AM #

Gideon

RE: First Vista UAC problem

I'm sorry i sound stupid but where in the properties do I unblock it?

I see the same dialog I would see if I just opened properties myself?

Thanks

Gideon | Reply

12/4/2008 5:11:47 AM #

Gideon

RE: First Vista UAC problem

I'm sorry i sound stupid but where in the properties do I unblock it?

I see the same dialog I would see if I just opened properties myself?

Thanks

Gideon | Reply

12/4/2008 6:03:40 AM #

Gideon

RE: First Vista UAC problem

Sorry for the double post, I hit refresh by msitake.

After an hour of internet browsing It seems like a few misunderstood people like me dont have the "Unblock" option on the general file properties? No matter what!?

Any ideas why? I have Vista ultimate, Sp1.

Gideon | Reply

12/4/2008 9:06:40 AM #

RE: First Vista UAC problem

The "Unblock" button should be on the "General" page of the properties dialog. It'll only be there if the file was marked as being downloaded from the internet, and as far as I'm aware only Internet Explorer sets this - so if you use Firefox or Chrome, you won't see it.

But if you've got a file that displays the scary "this was donwloaded from the internet" warning dialog when you double click on it, but when you display the properties then there's no "Unblock" button, then I don't really have an answer.

Unless the file you're bringing properties up for is actually a shortcut to a file that's been marked. In which case, it won't have the Unblock button. Click on "Find Target" or "Open file location" or whatever that button's called, and bring up the properties of that file.

Hope this helps...
Matt

Matt Ellis | Reply

12/4/2008 3:41:30 PM #

Gideon

RE: First Vista UAC problem

Hi thanks,

See Everything.exe (the file) has a little shield icon on it  and every time I run it, UAC will prompt me. I'm guessing now that this is different from internet downloaded files?

I want the UAC on for now, but is there a way I could whitelist the exe so the UAC prompt won't show up?

I'm sorry if all this is silly, i'm really new to Vista, I just got it installed 3 days ago.

Thanks so much.

Gideon | Reply

12/4/2008 5:54:05 PM #

RE: First Vista UAC problem

Don't worry, this isn't silly. This prompt and UAC are kind of similar really - both warn you that you're about to run a file, just for different reasons.

The prompt I'm talking about here is warning you (reminding you) that you're running a file from the internet, so you'd better be sure you got it from someone reputable. It's easy to ignore.

The UAC prompt is a much sterner prompt. It's telling you that this program is going to do something that requires an administrator to run - like installing a program. And instead of warning you, it's asking permission. If you're not an administrator, you won't be able to run it.

You can't whitelist files for UAC - it's all or nothing. The only thing you can do is disable UAC, and I'd strongly suggest you don't! UAC can be a bit irritating just when you've got a new computer, 'cos you're usually installing a lot of new programs, but it soon settles down, and after the first week or two, hopefully, you won't see UAC much at all.

Cheers
Matt

Matt Ellis | Reply

12/5/2008 4:00:13 PM #

Gideon

RE: First Vista UAC problem

Hi, thanks so much.

I don't intend to turn off UAC, it was the thing that threw me off when I first tried Vista Beta2 but now I can see the advantage.

What do you mean by it "settles down"

I read that Vista honours only signed programs or ones with a manifest. So is there a way I can create one myself? The annoying bit it, my nifty little autohotkeys shortcuts (which I SO used to now) won't work since Vista doesn't allows sending messaged to an untrusted exe right?

Thanks.
Gideon

Gideon | Reply

12/5/2008 6:34:26 PM #

RE: First Vista UAC problem

By "settle down", I just mean that you don't see it as often - you're doing less administrative stuff, and so don't see it as often.

Not sure what you mean by "Vista honours", but if the exe is signed, you get a nicer looking UAC prompt, see news.softpedia.com/.../...a-UAC-Colors-46078.shtml for more.

And Vista automatically fires up the UAC prompt for files with special names, like "setup.exe" or "installer.exe", or if your application has a manifest. MSDN (msdn.microsoft.com/en-us/library/bb756929.aspx) has more details on manifests.

As for the auto-hotkeys thing, it's kind of the other way round - Vista doesn't allow a normal app (or low privelege app like IE) to send messages to a higher level app, such as one running elevated through UAC (or a normal app if you're IE).

Matt Ellis | Reply

12/7/2008 8:54:42 AM #

Gideon

RE: First Vista UAC problem

oh by honours i meant leaves alone.I figured maybe I could make a manifest or something so it would ignore everything.exe.

Oh!! Very Interesting about the messaging thing. I got autohotkeys to run elevated and viola! It works!

Thanks so much for your time Matt. Really appreciate it!
Gideon

Gideon | Reply

3/9/2009 5:42:55 PM #

Anonynomous

Or you could...

just use a file\zip manager like Winrar or 7-zip under elevated privileges to open the properties dialog.
Basically you can use any program which can launch the properties dialog.

Anonynomous | Reply

Add comment


(Will show your Gravatar icon)

biuquote
  • Comment
  • Preview
Loading



About the author

Something about the author

Calendar

<<July 2010>>
MoTuWeThFrSaSu
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

View posts in large calendar

RecentComments

Comment RSS

License

Creative Commons License
Except where otherwise noted, content on this site is by Matt Ellis and is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.

©2010 Matt Ellis