An inetersting one regarding Vista UAC

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
Phil Pendlebury
Automation Wizard
Posts: 543
Joined: Tue Jan 16, 2007 9:00 am
Contact:

An inetersting one regarding Vista UAC

Post by Phil Pendlebury » Mon Mar 23, 2009 5:54 pm

Greetings,

This is not a support request but hopefully someone may be able to offer some insight.

During my last update I moved a lot of my files to the AppData - Roaming area of Vista. This was because poeple who have UAC turned on were getting Problem Event Name: APPCRASH Application Name: exportpro.exe etc. If they did not run my app as admin.

The problem was that my ini file was in the Program Files folder and UAC didn't like it to be written to.

This has solved the problem.

However, a use posted this:
The update has fixed the earlier reported error message.
However, now, the executable 'exportpro.exe' is seen by Vista as needing to be run with Admin privileges. In explorer, the icon shows the UAC 'shield' inside your icon (see attached image).

When run, I get the UAC dialog 'an unidentifed program want access'. No problem, I use the 'allow' button. MEAP runs fine.

Rather oddly, none of your other apps show this UAC shield. If I rename 'exportpro.exe', the shield goes (and MEAP runs without any UAC prompt). If I put back it's original name, the shield re-appears.

The attached screenshot shows that I have copied the EXE and renamed it 'exportpro2.exe'. And there is no shield.
Here's the screen shot: http://www.meap.biz/forum/download/file.php?id=8

I must admit my knowledge in this area is a little lacking and I have always had UAC turned off myself.

I would be interested to hear some of you experts thoughts on this though.

Is it something I should worry about and if so is there an obvious fix?

Up until now I have just been telling my users to turn off UAC or run the exe in admin mode.
Phil Pendlebury - Linktree

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Mar 23, 2009 7:13 pm

The first thing Vista looks at is the file's manifest which can contain the requireAdmin token. I know you haven't added a manifest and in any case if you had, renaming the file wouldn't affect it. But if a file does not have such a directive in it's manifest, or no manifest, then Vista looks at the filename and does some guess work. If the filename has the word "setup" or "install" in it it assumes the file is an installer. Installers generally need admin privileges so Vista gives the file the shield and requests Admin elevation when it is run. Since the only thing that is changing in your scenario is the file name it would appear this is what is happening, but I'm not sure why exportpro would make it think it needs admin privs.

I've tried searching for a definitive list of filenames that Vista uses, but cannot find one (Microsoft may not publish one). Setup and Install are the well known ones. If anyone knows of a definitive list then I'd be interested to know. In any case this must be what is happening in your case. Simple solution: give the file a different name!
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Phil Pendlebury
Automation Wizard
Posts: 543
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Mon Mar 23, 2009 7:26 pm

Thanks Marcus.

I suppose I could turn the painful UAC back on and test it too.

:-)
Phil Pendlebury - Linktree

User avatar
Phil Pendlebury
Automation Wizard
Posts: 543
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Mon Mar 23, 2009 7:42 pm

OK turned UAC back on.

Funny thing is I can't repro this on my account (admin) or even the none admin Guest account.

Neither of them show a shield on my application.
Phil Pendlebury - Linktree

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Mar 23, 2009 7:56 pm

Weird. Are we sure the user hasn't "accidentally" right clicked on the file and checked the "run as administrator" box!?

I'd be happy to try it on my system if you like. Send it or a download link over. But, frankly, doesn't sound like its worth losing too much sleep over.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Phil Pendlebury
Automation Wizard
Posts: 543
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Mon Mar 23, 2009 8:12 pm

mtettmar wrote:Weird. Are we sure the user hasn't "accidentally" right clicked on the file and checked the "run as administrator" box!?

I'd be happy to try it on my system if you like. Send it or a download link over. But, frankly, doesn't sound like its worth losing too much sleep over.
Nope Marcus you are right. Not worried about this I just thought it may be an interesting discussion.

I probably posted in the wrong place really.

I will send you the installer though at some point, along with some tutorial videos that are almost done.

:-)
Phil Pendlebury - Linktree

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Mar 24, 2009 4:57 pm

Phil Pendlebury wrote:Nope Marcus you are right. Not worried about this I just thought it may be an interesting discussion.

I probably posted in the wrong place really.
Not at all.
Phil Pendlebury wrote:I will send you the installer though at some point, along with some tutorial videos that are almost done.:-)
Cool! Looking forward to seeing them.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts