Command Line


  1. Posts : 519
    Windows 7 Ultimate (64)
       #1

    Command Line


    Is there a cmd.exe /switch for “run as administrator” ?

    Thanks-
      My Computer


  2. Posts : 1,261
    Windows 7 Professional 32-bit SP1
       #2

    win7clutz said:
    Is there a cmd.exe /switch for “run as administrator” ?

    Thanks-
    Not that I'm aware of, but if you click the start orb, type "cmd" (without quotes) then right-click "cmd.exe" in the search results, you can then select "Run as Administrator" (but you already knew that...)

    Here is a part of the switches available to CMD.EXE (You can get more by opening a command line window, then type "CMD /?" (without quotes) and pressing <ENTER>:

    Code:
    C:\Users\Peter Dzomlija>cmd /?
    Starts a new instance of the Windows command interpreter
    CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]
        [[/S] [/C | /K] string]
    /C      Carries out the command specified by string and then terminates
    /K      Carries out the command specified by string but remains
    /S      Modifies the treatment of string after /C or /K (see below)
    /Q      Turns echo off
    /D      Disable execution of AutoRun commands from registry (see below)
    /A      Causes the output of internal commands to a pipe or file to be ANSI
    /U      Causes the output of internal commands to a pipe or file to be
            Unicode
    /T:fg   Sets the foreground/background colors (see COLOR /? for more info)
    /E:ON   Enable command extensions (see below)
    /E:OFF  Disable command extensions (see below)
    /F:ON   Enable file and directory name completion characters (see below)
    /F:OFF  Disable file and directory name completion characters (see below)
    /V:ON   Enable delayed environment variable expansion using ! as the
            delimiter. For example, /V:ON would allow !var! to expand the
            variable var at execution time.  The var syntax expands variables
            at input time, which is quite a different thing when inside of a FOR
            loop.
    /V:OFF  Disable delayed environment expansion.
      My Computer


  3. Posts : 748
    Vista and now 7 in 32 and 64 bit.
       #3

    You can use this:
    Click Start.
    Type Command.
    Right-click Command Prompt, and then click Properties.
    2. On the Shortcut tab, click Advanced.
    3. Select the Run as administrator checkbox.

    4. Click OK twice.
    After this you will not need the "run as Administrator" tag. You may need to downgrade the UAC settings. I havn't been there as I have it turned off.
    Last edited by davehc; 26 Nov 2009 at 01:44.
      My Computer


  4. Posts : 519
    Windows 7 Ultimate (64)
    Thread Starter
       #4

    Thanks for the replies. I use Stardocks ObjectDockPlus and trying to get an elevated command prompt on one of my docks. I’ll keep playing with it…

    OFF TOPIC:

    I have no idea who created or who is behind your Windows Seven Forum, but I’ve got to say “Three Cheers” as you guys have not only done a great job with structure and management of it, it’s clear you are an invaluable resource for thousands of users. Microsoft would be wise to follow your lead and I want to personally Thank You…

    Ken
      My Computer


  5. Posts : 1,261
    Windows 7 Professional 32-bit SP1
       #5

    win7clutz said:
    Thanks for the replies. I use Stardocks ObjectDockPlus and trying to get an elevated command prompt on one of my docks. I’ll keep playing with it…

    OFF TOPIC:

    I have no idea who created or who is behind your Windows Seven Forum, but I’ve got to say “Three Cheers” as you guys have not only done a great job with structure and management of it, it’s clear you are an invaluable resource for thousands of users. Microsoft would be wise to follow your lead and I want to personally Thank You…

    Ken
    That would be z3r010 and Brink, our esteemed admins.
      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 23:13.
Find Us