Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Command-line Argument for Admin Rights


21 Jul 2009   #1
bahua

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
Generator

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

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
bahua

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
Generator

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

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
AVPhile

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




Thread Tools



Similar help and support threads for2: 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
Solved Why does every app need admin rights? General Discussion
Admin rights General Discussion
Admin rights and .exe General Discussion
Admin Rights General Discussion

Our Sites

Site Links

About Us

Find Us

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

All times are GMT -5. The time now is 03:36 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App