Solved The requested operation requires elevation

tropicalbound

New Member
Messages
5
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 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?

Thanks!

TB
 
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.
 
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.
 
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 Win8 didn't fall to far from the Apple tree.

TB
 
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.
 
Right. UAC is disabled on all my Win7 machines. I have disabled UAC on the Win8 machine as well, and am logged on as a local administrator. Still, there are something I can't do....(such as listed above).

TB
 
Right. UAC is disabled on all my Win7 machines. I have disabled UAC on the Win8 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 Win8.

Try to see this registry thing in Win8 (SIW's post ) at #7 solves it:
http://www.eightforums.com/system-s...have-so-many-security-prompts.html#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.
 
Right. UAC is disabled on all my Win7 machines. I have disabled UAC on the Win8 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 Win8.

Try to see this registry thing in Win8 (SIW's post ) at #7 solves it:
http://www.eightforums.com/system-s...have-so-many-security-prompts.html#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.

You're totally right.

Thanks for the notice.
 
Changing the registry key worked!! Many thanks!

You know, I did notice that when I moved the UAC slider to the 'off' position, I was not reminded to reboot. However, once I changed the registry key, the prompt showed.

Interesting how I need elevated permissions just to add TCP routes, but I do NOT need elevated permissions to use regedit. Odd.....

TB
 
Here is what worked very well for me. Just tested it.

Capture.PNG
 
Seems that UAC is a bit different in Win8.

In Windows 8 you cannot shut it completely off, if you do, it disables a whole bunch of important things. I don't know the scope of that yet, still trying to see what all is affected.

Still, is there no way to just elevate the rights of one single program?
 
...or shim it with the appcompat toolkit so that it *doesn't* need to violate the security of the whole OS?
 
...or shim it with the appcompat toolkit so that it *doesn't* need to violate the security of the whole OS?

ROFL! I am going to have to learn a whole new language for windows 8 it seems. Cluberti, can you explain that a little, so I can try it?

[edit]I downloaded the toolkit, I need to have an SQL server running to do anything with it? I know I have one installed, it came with Windows Live - But how I I start it, configure it. Wow - What a mess, just to elevate a process. I suppose I will have to spend the most part of a day reading. Every time I think I have Microsoft figured out, they kick me in the buttocks again.

I remember when Vista came out, there was an app compatibility manager that was fairly easy to run, all I had to do was open it, find the blocked apps, and enable them. This is what Windows 8 clearly needs, something like that for the novice to run. Some kind of manager program that runs these processes automatically, maybe like a batch file. I see someone mentioned adding it into the task scheduler, so maybe I can build one, once I learn how to do it.
 
Last edited:
No, you don't need SQL, although MSDE is required. Reason is, a lot of the rules that come pre-configured (and the ones you can create) get stored somewhere - SQL. Also, the appcompat database files that are generated to be installed on machines where the shims are to be used are .sdb files, which require a database engine on the "tools" machine where you do the work to create them.
 
Well, the program looks for an SQL server the moment you start it- so I just go forward without it?

Oh- I was trying to run the manager, not the toolkit. Now that I see the actual program- it Is the same as the appcompat that I used to use for Vist-Poodoo.

Ok - This is the exact same program they had for Vista. I tried a number of settings, but none of them worked. I tried making a "shim" but I'm not sure if I did it corretly.

I'm trying the dot net repair tool, which is what the developer of the app Im trying to use told me to do, so once I do that I'll get back to this. thanx.
 
Last edited:
I found out what is causing this, it's my DOT NET 4 and 4.5, they both need to be removed and re-installed. GOD DAMN Microsoft for BLOCKING this.

What happened was I updated from Windows 7, and I had a broken Dot Net 4 and 4.5 on that machine, and it was not repairable under windows 7 either, because my SFC /scannow was being prevented from starting and the same problem also prevented me from doin an in place Windows 7 install which would have repaired everything.

So basically, all of the errors that prevented me from fixing my Windows 7, got copied over into Windows 8, and now Windows 8 has a god damned block on Dot Net. I've only had Windows 8 for about 3 weeks, originally I was impressed with the speed. But now I'm finding, the RELIABILITY of windows 8 leaves much to be desired, also, it is VERY unstable.

Breathe on it wrong and you get a Black Screen of Death. Windows 7? You could start it up and walk away and all of your automated process and servers and things you connect to from your iPhone all worked forever. Windows 8? Some damn problem or other, causes your network to stop responding. Causes your Router to get blocked up, so as it is now, Until I can fix the stability issues, it is very unusable for me at this point.

Well, I need to totally remove dot 4 and 4.5 and re-install them, if you know a a way to bypass the hard BLOCK on those, I'm a Ferengi with All Ears.
 
Back
Top