Windows 7 Forums


Windows 7: Command-line Argument for Admin Rights

21 Jul 2009   #1

Windows 7
 
 
Command-line Argument for Admin Rights

I am enjoying Windows 7, but because of some relatively simple disagreements I have with the interface, I've installed litestep as my shell, which I was very comfortable using in previous versions of Windows. Aero and the new and improved task bar just don't cut it for me. The biggest difference I need is hotkeys for starting applications, and from what I've seen Windows 7 doesn't have it. That's fine. Litestep does and that solves my problem.

However, I also prefer to use vim for my text editing, as it's far more powerful than notepad, and I don't need to muck around with the mouse to use it. I usually start it by right-clicking a text file and selecting the "edit with vim" shell extension that was enabled when I installed vim, and then it's all keyboard.

Unfortunately, there doesn't appear to be a way to edit the access settings when starting vim this way. I want it to run with full administrative access every single time I run it. That's basically all I use it for, other than some idle notes and light coding.

Is there a command-line argument to grant full administrative access to an application, or perhaps a way to grant my user unprompted administrative access? It appears that my user is an administrator, but not really. This new model of security through confirmation is dangerous, but in the case of someone that knows how to use their computer, and how they want it to work, it's just plain annoying.

Can anyone address these concerns?

My System SpecsSystem Spec

21 Jul 2009   #2

XP Pro SP3 x86/Vista SP2 x64/Win7 x64 Triple-boot
Lancashire, England
 
 

Quote   Quote: Originally Posted by bahua View Post
I am enjoying Windows 7, but because of some relatively simple disagreements I have with the interface, I've installed litestep as my shell, which I was very comfortable using in previous versions of Windows. Aero and the new and improved task bar just don't cut it for me. The biggest difference I need is hotkeys for starting applications, and from what I've seen Windows 7 doesn't have it. That's fine. Litestep does and that solves my problem.

However, I also prefer to use vim for my text editing, as it's far more powerful than notepad, and I don't need to muck around with the mouse to use it. I usually start it by right-clicking a text file and selecting the "edit with vim" shell extension that was enabled when I installed vim, and then it's all keyboard.

Unfortunately, there doesn't appear to be a way to edit the access settings when starting vim this way. I want it to run with full administrative access every single time I run it. That's basically all I use it for, other than some idle notes and light coding.

Is there a command-line argument to grant full administrative access to an application, or perhaps a way to grant my user unprompted administrative access? It appears that my user is an administrator, but not really. This new model of security through confirmation is dangerous, but in the case of someone that knows how to use their computer, and how they want it to work, it's just plain annoying.

Can anyone address these concerns?
Code:
runas /user:REQUIREDUSERNAME /savecred c:\PATH\TO\APP.exe
You could run as admin using the above replacing 'REQUIREDUSERNAME' with admin account name.

/savecred will make it ask for admin password on the first run only.
My System SpecsSystem Spec
21 Jul 2009   #3

Windows 7
 
 

Quote   Quote: Originally Posted by Generator View Post
/savecred will make it ask for admin password on the first run only.
The first run on each boot?

Also, thanks!
My System SpecsSystem Spec
.


21 Jul 2009   #4

XP Pro SP3 x86/Vista SP2 x64/Win7 x64 Triple-boot
Lancashire, England
 
 

Quote   Quote: Originally Posted by bahua View Post
The first run on each boot?

Also, thanks!
No.. it should remember it for good once it's been done.

you will have to redo the password for different user accounts though if others need to run it.

EDIT: stick the command in a batch file and create a shortcut to that to run your app each time, I should have been clearer to start with, sorry.

To create a batch file if you don't know, create a new txt file and rename the extension from '.txt' to '.bat' once you have put the command line inside the txt file.
My System SpecsSystem Spec
18 Oct 2012   #5

Windows 7 Home Premium
 
 

Please note:

/savecred to use credentials previously saved by the user.
This option is not available on Windows 7 Home or
Windows 7 Starter Editions
My System SpecsSystem Spec
Reply

 Command-line Argument for Admin Rights problems?



Thread Tools



Similar help and support threads for: Command-line Argument for Admin Rights
Thread Forum
"Mail to" shortcut in Send To context menu fails command line argument Browsers & Mail
admin user lost some admin rights BSOD Help and Support
e/u has local admin rights but he still gets need admin rights message Network & Sharing
Solved Admin rights General Discussion
admin rights.. Performance & Maintenance


All times are GMT -5. The time now is 09:18 AM.


Seven Forums Android App Seven Forums IOS App Follow us on Facebook

Windows 7 Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows 7" and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32