Command-line Argument for Admin Rights


  1. Posts : 2
    Windows 7
       #1

    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 Computer


  2. Posts : 805
    XP Pro SP3 x86/Vista SP2 x64/Win7 x64 Triple-boot
       #2

    bahua said:
    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 Computer


  3. Posts : 2
    Windows 7
    Thread Starter
       #3

    Generator said:
    /savecred will make it ask for admin password on the first run only.
    The first run on each boot?

    Also, thanks!
      My Computer


  4. Posts : 805
    XP Pro SP3 x86/Vista SP2 x64/Win7 x64 Triple-boot
       #4

    bahua said:
    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 Computer


  5. Posts : 1
    Windows 7 Home Premium
       #5

    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 Computer


 

  Related Discussions
Our Sites
Site Links
About 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 16:29.
Find Us