Results 1 to 3 of 3

Thread: Run an exe with UAC turned on (Vista Issue)

  1. #1

    Thread Starter
    Lively Member feneck's Avatar
    Join Date
    Mar 2007
    Location
    Australia, Queensland, Gympie
    Posts
    85

    Question Run an exe with UAC turned on (Vista Issue)

    What is the proper way to run an executable (.exe) file in Microsoft Windows Vista, with UAC (User Account Control) turned on?

    Also, how can I detect that UAC is turned on or off? (I am guessing it is *somewhere* in the registry )

    Thanks

    REMEMBER TO RATE

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Run an exe with UAC turned on (Vista Issue)

    Yes its in the registry but to read the registry will take administrator permissions which will invoke the UAC prompt lol.

    You are needing to run your whole program as Admin? Its usually not a good idea from a security standpoint but you need to use a manifest with the requesting level you desire for your exe. then if the user is an Admin it will prompt for a Yes/No msgbox to allow or not but if the user is a user then they will get prompted to enter in admin credientals to allow the execution.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Lively Member feneck's Avatar
    Join Date
    Mar 2007
    Location
    Australia, Queensland, Gympie
    Posts
    85

    Re: Run an exe with UAC turned on (Vista Issue)

    Damn, Microsoft thought that registry thing thought

    Oh, sorry, i didn't explain myself fully.
    I have my VB6 program, that launches another program that you choose on your hard drive. I'm having trouble, because whenever UAC is turned on it errors, but if UAC is off it is fine, just as it is fine when run on XP.

    So, this manifest file, if the file is specific per exe I don't think that will work as on the program, you can choose the exe to run, so basically, the exe it will be running, will be random.

    REMEMBER TO RATE

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