Solved

How to automate a shell with admin privs.

Posted on 2007-04-09
10
440 Views
Last Modified: 2010-05-18
In Microsoft Vista, the UAC is rapidly becoming a real PITA. In order for me to issue the command 'netsh int tcp set globalautotuninglevel=disabled' I must drill down to \windows\system32 folder, highlight cmd.exe, and right click on it to switch over to the admin security token, all just so I can run the batch file with the netsh command in it. Does anyone out there know of a command line argument I may employ in a .bat file to automate this process. It needs to be done each time I boot the Vista box so that my Wireless USB NIC will run for more than a minute without turning off the tcp stack, necessitating yet another reboot. Gotta love that UAC thingy. Any other method I may employ to automate this task will also be greatly appreciated.
0
Comment
Question by:Cameron Rowe
10 Comments
 
LVL 30

Expert Comment

by:SteveGTR
ID: 18878513
You can always fallback to the runas command.
0
 
LVL 30

Accepted Solution

by:
SteveGTR earned 32 total points
ID: 18878516
0
 
LVL 11

Assisted Solution

by:JamesCssl
JamesCssl earned 31 total points
ID: 18878601
press in sequence:
Winkey
cmd
Ctrl+shift+enter
Alt+c

You now have a command prompt with admin token
0
 
LVL 15

Assisted Solution

by:Ryan_R
Ryan_R earned 31 total points
ID: 18879050
can't remember exactly which option I used, but there's one in TweakVI that allows me to automatically run everything with the highest Admin priveleges without me using a RunAs command, etc

eg - If i go start, type   cmd   and hit enter it says 'Administrator: C:\Windows\system32\cmd.exe'

do a google on TweakVI and download the free basic version as the option is included in there somewhere (with other good tweaks)
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Assisted Solution

by:source2k3
source2k3 earned 31 total points
ID: 18880663
If you're looking for fast, fastest thing is clicking the windows button on your keyboard, typing pro which will make command prompt appear on the list.  Right click and choose "run as administrator" this will ensure you're running the command as admin.

I personally not only turned UAC off globally but I use the Administrator account as my main account.
0
 
LVL 4

Expert Comment

by:Caudax
ID: 18884322
>>I personally not only turned UAC off globally but I use the Administrator account as my main account.

Any *nix user would lambast you for doing this.
0
 
LVL 15

Expert Comment

by:Ryan_R
ID: 18887515
source2k3 - I think you should try out TweakVI as well - that way you wouldn't have to use the local Admin account
0
 

Author Comment

by:Cameron Rowe
ID: 18921797
"I personally not only turned UAC off globally but I use the Administrator account as my main account."
While this doubtless is convenient it is also somewhat akin to using the front sight on your pistol to scratch your bum, in that should doing so result in a corrupted profile you had better hope you have at least one more local profile with admin privs already in place on the machine. Caudax is right.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
ZIP or ZIPX 8 71
stamp tool on acrobat 1 26
how to find then copy to anotehr file 3 26
Excel Error per WinZip Add-In 9 31
Several part series to implement Internet Explorer 11 Enterprise Mode
I'm a big fan of Windows' offline folder caching and have used it on my laptops for over a decade.  One thing I don't like about it, however, is how difficult Microsoft has made it for the cache to be moved out of the Windows folder.  Here's how to …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now