Solved

How to automate a shell with admin privs.

Posted on 2007-04-09
10
443 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
The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

 
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

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sleep laptop 20 71
robocopy script with data and file filter restrictions 3 28
Sony EVI-D70 and Skype 2 41
Listening device 21 42
This is an article about Leadership and accepting and adapting to new challenges. It focuses mostly on upgrading to Windows 10.
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…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

821 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