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


25 Nov 2009   #1

Windows 7 Ultimate (64)
 
 
Command Line

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

Thanks-


My System SpecsSystem Spec
.

26 Nov 2009   #2

Windows 7 Ultimate x64
 
 

Quote   Quote: Originally Posted by win7clutz View Post
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 System SpecsSystem Spec
26 Nov 2009   #3
Microsoft MVP

Vista and now 7 in 32 and 64 bit.
 
 

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.
My System SpecsSystem Spec
.


26 Nov 2009   #4

Windows 7 Ultimate (64)
 
 

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 System SpecsSystem Spec
26 Nov 2009   #5

Windows 7 Ultimate x64
 
 

Quote   Quote: Originally Posted by win7clutz View Post
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 System SpecsSystem Spec
Reply

 Command Line




Thread Tools



Similar help and support threads for2: Command Line
Thread Forum
UAC bug with runas from command line? General Discussion
How can I set this via command-line or registry? Customization
Looking for a Text to speal from a command line Sound & Audio
Gpedit via command line Performance & Maintenance
libraries and the command line Performance & Maintenance
How to run a command line utility? General Discussion
Can you boot from the command line? Chillout Room

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 01:08 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

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 33