CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2011
    Posts
    1

    Goddamn Vista User Account Control

    Hello kind people,

    Can someone in the know explain this to my tiny brain please.

    I am using Vis Studio 2005 and have written a simple nooby iTunes interface program. Not that it's relevant, but it's in C# and uses the iTunes COM interface.

    It's fine. It works. It dumps out a few tracks from my iTunes library. Whoop-di-doo!

    However...

    ...being the hardened corporate IT person that I am, I always run my home PC in standard-user mode. I always have. Stood me in good stead, so it has. And I still do (even in Vista).

    Now. When I try to run the said program (above), *PAAARP*...this program requires elevation. And then I have to enter my administrator account credentials...(which then loads the administrators iTunes library. Nice one...thanks for that Microsoft, very useful).

    So I find myself thinking...well what, in the name of all that is holy, does my program need admin privilege for? It doesnt bloody do anything. I've written a hundred programs before without this issue.

    After dicking around with many an option, I got nowhere. So I decided to find out what in my app was causing the admin elevation requirement. So I turned off User Account Control altogether in the hope that, when I ran as a standard user, I would get some access denied message, or exception I could work with.....

    ...but no. The bugger worked just fine. No hint of a problem.

    So, if this program can access all that it needs to (and bear in mind everything is locked down here), why does it ask me for admin password when UAC is switched on? Does anyone know?

    Ahhh...it's good to get that off my troubled chest.

    Sq!

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: Goddamn Vista User Account Control

    [ redirected thread ]
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    Dec 2007
    Posts
    234

    Re: Goddamn Vista User Account Control

    When you turn off the UAC, it means that you are telling Windows, run what ever permissions apps need and don't bother with asking for elevated permissions, just doit. If the control you were using was COM, and the app .NET based... that might have been what it was.

    Don't know. I found the UAC annoying enough that I usually turn it off as soon as I can on Vista. With Win7, it got better, year and a half later and I still have my Win7 UAC turned on.

    -tg
    * I don't respond to private requests for help. It's not conducive to the general learning of others.-I also subscribe to all threads I participate, so there's no need to pm when there's an update.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help - how to remove eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to???
    * On Error Resume Next is error ignoring, not error handling(tm). * Use Offensive Programming, not Defensive Programming.
    "There is a major problem with your code, and VB wants to tell you what it is.. but you have decided to put your fingers in your ears and shout 'I'm not listening!'" - si_the_geek on using OERN
    MVP '06-'10

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Goddamn Vista User Account Control

    Don't leave home without it. Search for ELEVATE.VBS, which will do what it implies.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured