The requested operation requires elevation


  • Hello,

    I have made myself a member of the local administrators group.  I have a script I run on all my WinXP and Win7 machines that connects to my office's VPN.  The VPN is a split tunnel, so my script will add the routes to other subnets in my network:

    route add 192.168.x.x mask 192.168.x.x

    As I said, in WinXP and Win7 this works fine, but in Win8 I receive this error:

    "The requested operation requires elevation"

    I don't want the end user to have to right click on the file and 'Run As Administrator' since the script also takes advantage of user specific environment variables such as %appdata%.

    Any suggestions?


    Monday, September 24, 2012 4:52 PM


All replies

  • Have you researced disabling Admin Approval mode via secpol.msc or enabling administrators to elevate without prompting

    Security Settings\Local Policies\Security Options

    Don't forget to mark your posts as answered so they drop off the unanswered post filter. If I've helped you and you want to show your gratitude, just click that green thingy.

    Monday, September 24, 2012 5:18 PM
  • Knuckle-Dragger,

    I turned off UAC.  The security setting is already set to 'Elevate Without Prompting'.  I don't receive the UAC prompting when installing programs or making changes in Administrative Tools.  I'm only receiving the error from the Command Line.

    Here's a Catch-22:  I'm trying to copy a telnet program from a Windows share to the Program Files folder (again, from the CLI) and I get the error that I need to elevate permissions.  So, if I run CMD with admin privileges, than I cannot access the C$ share on the server.  I hope we can find a work-around...


    Monday, September 24, 2012 7:04 PM
  • If you deploy the script via GPO, the script should run with high privilege on clients.

    Another way is create a scheduled task which runs the script.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”

    Wednesday, September 26, 2012 8:41 AM
  • HI,

    i was facing similar issue... try to open CMD by using 'Run as Administrator' will not show this error & route will be added...

    • Proposed as answer by Faiz_Win Wednesday, November 13, 2013 4:03 AM
    Wednesday, November 13, 2013 4:03 AM