Results 1 to 2 of 2

Thread: [RESOLVED] Possible to run exe as Admin through code?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Feb 2016
    Location
    Tennessee
    Posts
    2,437

    Resolved [RESOLVED] Possible to run exe as Admin through code?

    I'm reading a list of filenames and I get "access denied" errors on some of the files. I found out if I right click the exe and select run as administrator, I no longer get the error.

    Is there anyway to use code that will make your program run in admin mode?

    thanks for looking
    any help appreciated

  2. #2

    Thread Starter
    PowerPoster
    Join Date
    Feb 2016
    Location
    Tennessee
    Posts
    2,437

    Re: Possible to run exe as Admin through code?

    Found the answer to my question. For anyone who wants to know. Here's what I did. Got to project application properties and and click "View Windows Settings". This brings up the manifest file.
    Change:
    Code:
    <requestedExecutionLevel level="asInvoker" uiAccess="false" />
    To:
    Code:
     <requestedExecutionLevel level="highestAvailable" uiAccess="false" />

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