Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3615104
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:19:55+00:00 2026-05-18T22:19:55+00:00

Is it possible to run handle.exe (from sysinternals) from a service (in windows7) without

  • 0

Is it possible to run handle.exe (from sysinternals) from a service (in windows7) without having to turn off UAC?

The service is a custom c-app that needs to find out which process is locking a file it tries to access and handle.exe seems to be a good way to solve it but i can’t get it to work with UAC turned on. This app runs all the time so i can’t have a UAC prompt while its running but its fine if it shows up at startup.

Handle.exe works fine from an admin commandprompt but fails when trying to run from a normal prompt.

I call handle.exe from CreateProcess() and get the output from pipes. I guess there should be a way to solve this but i can’t figure it out. Setting up the service to log in from an admin account does not seem to work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T22:19:56+00:00Added an answer on May 18, 2026 at 10:19 pm

    UAC does not affect services (it only affects interactive sessions) so that should work.

    However, if you don’t want to move your entire program into a service then there are better ways to do this which don’t require creating, installing and managing a separate service process in addition to your main program.

    1. If your program requires admin rights to work at all, and this isn’t the only place it will require them, then you could flag your program (via its embedded manifest resource) as requiring administrator rights. It will then trigger one UAC prompt whenever it is run and be run with full admin rights, including the ability to run Handle.exe.

    2. On the other hand, if this is the only place where your program needs admin rights, it may make sense to create a COM DLL which wraps your Handle.exe call (or any other admin work) so that you can use UAC to make elevated calls to that function from your non-elevated app. You will then trigger a UAC prompt each time you create (an elevated version of) that COM object. You can keep the COM object open as long as you want, and create it whenever you want, so when and how often the UAC prompt(s) appear are still up to you.

    Both 1 & 2 are standard uses of UAC so any good documentation or tutorial on UAC will describe how to do them in detail.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to run an external process from Perl, capture its stderr, stdout
Is it possible to run a ruby application as a Windows Service? I see
From the command prompt it's possible to run for example open http://www.example.com and have
Should it generally be possible to run a program from the source directory (src)
Using only MySQL , I'm seeing if it's possible run an insert statement ONLY
Is it possible to run both debuggers within the same PHP installation simultaneously. They
I noticed its possible to run SQL scripts with Oracle's SQLPlus by providing only
Is it possible to run the 32-bit version of Visual Studio 2008 Professional on
Is it possible to run a batch file as a menu item in studio
Is it possible to run an UPDATE command on mysql 5.0 with a sub

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.