Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.