Solved

How to automate a shell with admin privs.

Posted on 2007-04-09
10
442 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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
 
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
virus question? 6 75
Simulate file lock 5 34
paging file usage  > 95% for 30 min about 12 33
Windows NLB cluster 3 30
When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

831 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