Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to know if it is possible to control UAC behaviour in command line. Like for example, can i make a batch script for UAC to prompt user with dialogue for elevation when i try make changes in protected folder. Now if i do copy command to protected folder if does not prompt for elevation instead it fails with error message 'access denied'. I dont want to disable it, but work with it. What language should i code in if i want to work with UAC.

share|improve this question

There is no built-in tool for executing commands with elevated privileges. Here's what you can do:

  1. Open the command prompt or batch file as an Administrator.

  2. Use a third party tool like elevate:

    This utility executes a command with UAC privilege elevation. This is useful for working inside command prompts or with batch files.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .