Windows 8 and 8.1 Forums


The requested operation requires elevation

Page 1 of 3 123 LastLast
  1. #1



    Junior Member

    Join Date : Sep 2012
    Posts : 5
    Windows 8

    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 255.255.255.0 192.168.x.x

    As I said, in WinXP and Win7 this works fine, but in Windows 8 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?

    Thanks!

    TB


      My System SpecsSystem Spec

  2. #2
    Dellius's Avatar

    Member

    Join Date : Sep 2012
    Posts : 40
    Windows 8 Enterprise


    I am not sure if this would be applicable for your case, but Task Scheduler can solve your problem.

    Just add a task for your script, select "Run as Administrator", enter your credentials and it will run it silently with no popups with admin rights.
      My System SpecsSystem Spec

  3. #3



    Junior Member

    Join Date : Sep 2012
    Posts : 5
    Windows 8


    Thanks Dellius, but no, I cannot schedule a VPN connection.
      My System SpecsSystem Spec

  4. #4
    Dellius's Avatar

    Member

    Join Date : Sep 2012
    Posts : 40
    Windows 8 Enterprise


    Can't you schedule the script by pointing Task Scheduler directly to its executable file ?

    I use rasdial "My Connection" username password to schedule my broadband PPPOE connection, so that the computer will connect to the Internet before any user logs on, completely silently and with no prompts, bells or whistles.
      My System SpecsSystem Spec

  5. #5



    Junior Member

    Join Date : Sep 2012
    Posts : 5
    Windows 8


    Sorry for the confusion. Yes, it is possible to schedule this app to run and establish the connection. This is used mainly by my sales staff. I could set the schedule to run at startup and establish the connection. However, when the laptop goes into sleep mode (multiple reasons why) and awakens, the connection will no longer be established. If the user booted their laptop while disconnected from the Internet, the connection would fail as well. My users have also been instructed to disconnect from the VPN when they know it will not be in use. I don't want them to have to reboot or log off/on to re-establish.

    This VPN connection process has worked flawlessly for quite some time on Win7 and WinXP. I hope I will find a way to script things like adding routes or copying files to the Program Files folder. If not, it sounds like Windows 8 didn't fall to far from the Apple tree.

    TB
      My System SpecsSystem Spec

  6. #6



    Member


    Join Date : Sep 2011
    Redmond
    Posts : 571
    Windows 8.1 x64
    USA us washington


    Technically, adding routes to the routing table in Windows 7 required admin rights as well, so it sounds like UAC has been modified in your Windows 7 environment to auto approve. There's no limitation on XP, of course, but in Vista and higher, modifying the routing table is an administrative-level task that requires elevation.

    You might want to revisit your Win7 environment to see what's going on there.
      My System SpecsSystem Spec

  7. #7



    Junior Member

    Join Date : Sep 2012
    Posts : 5
    Windows 8


    Right. UAC is disabled on all my Win7 machines. I have disabled UAC on the Windows 8 machine as well, and am logged on as a local administrator. Still, there are something I can't do....(such as listed above).

    TB
      My System SpecsSystem Spec

  8. #8
    Hopachi's Avatar

    Polyhedric Stellation


    Join Date : Sep 2011
    Orbiting the Moon
    Posts : 2,920
    Windows 8.1 - 64bit, Others in VMs
    european union


    Quote Originally Posted by tropicalbound View Post
    Right. UAC is disabled on all my Win7 machines. I have disabled UAC on the Windows 8 machine as well, and am logged on as a local administrator. Still, there are something I can't do....(such as listed above).

    TB
    Seems that UAC is a bit different in Windows 8.

    Try to see this registry thing in Windows 8 (SIW's post ) at #7 solves it:
    http://www.eightforums.com/system-se...tml#post111624
      My System SpecsSystem Spec

  9. #9
    Dellius's Avatar

    Member

    Join Date : Sep 2012
    Posts : 40
    Windows 8 Enterprise


    Here seems to be an interesting article about scheduling the event to run on System Wake Up. I will try it out, too, as my problem is very similar to yours.

    I would still like to know where people get the correct event ID's from, but for now this seems to do the job.

    Trigger Task Scheduler in Windows 7 when computer wakes up from sleep/hibernate - Super User
      My System SpecsSystem Spec

  10. #10
    Dellius's Avatar

    Member

    Join Date : Sep 2012
    Posts : 40
    Windows 8 Enterprise


    Quote Originally Posted by Hopachi View Post
    Quote Originally Posted by tropicalbound View Post
    Right. UAC is disabled on all my Win7 machines. I have disabled UAC on the Windows 8 machine as well, and am logged on as a local administrator. Still, there are something I can't do....(such as listed above).

    TB
    Seems that UAC is a bit different in Windows 8.

    Try to see this registry thing in Windows 8 (SIW's post ) at #7 solves it:
    http://www.eightforums.com/system-se...tml#post111624
    UAC is very different from my experiences with it and the consequences are not nice when you disable it, as now OS functionality is tied to it.

    -You won't be able to use Metro Apps without UAC properly and they will generate a lot of errors.
    -You will NOT get notifications when programs need elevation, and now they will simply fail to run properly without giving a reason.
    -You will not be able to right-click a program and use "Run as Admin", it will still run it with low privileges.

    Eventually, you will need to keep UAC on its standard setting if you want your PC to work correctly.
      My System SpecsSystem Spec

Page 1 of 3 123 LastLast
The requested operation requires elevation
Similar Threads
Thread Forum
Solved Continuing issue - Assistance Requested Performance & Maintenance
Eight Forums Android App Eight Forums IOS App Follow us on Facebook

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23