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: How to change to Admin mode in CMD ?


25 Feb 2012   #1

Windows 7 Ultimate x86
 
 
How to change to Admin mode in CMD ?

When we open the CMD in normal way it will open with normal privileges. Is there any way we can change the mode by giving a command? (like sudo in Linux)

Thanks in advance.

PS: ctrl + shift + enter is not what I am asking


My System SpecsSystem Spec
.

25 Feb 2012   #2

XIPv3 on Windows XP SP3 x86
 
 

Hello Kapz,
  • Navigate to the following path using your explorer address bar: %SYSTEMROOT%\System32\
  • Right click CMD.exe and select "Run As..."
  • Select "The following user..." and type your administrator username and password then click OK
Thank you
My System SpecsSystem Spec
25 Feb 2012   #3

Windows 7 Ultimate x86
 
 

Thanks Joe for the reply but I want to start the cmd as a normal user and get the admin privilege later for the same command prompt. This approach will start the cmd as admin (or the specific user)
My System SpecsSystem Spec
.


25 Feb 2012   #4

Windows 8.1 Pro RTM x64
 
 

CMD needs to be invoked with the required credentials to begin with, as it is not possible to change this from within an existing CMD window. By default, this is as a standard user (even from within an administrative account). To open in elevated mode, see: Elevated Command Prompt

Note that if you have more than 1 standard user, it is not possible to enter the other standard user's credentials when prompted; the only credentials accepted are those of an administrator.
My System SpecsSystem Spec
25 Feb 2012   #5

Windows 7 Ultimate SP1 64-Bit
 
 

Welcome to Windows Seven Forums.

You could try creating a desktop shortcut to cmd.exe then right-click the shortcut and choose Properties.

You'll find cmd.exe under C:\Windows\System32.

Select the Shortcut tab and click Advanced.

Enable Run as Administrator and click OK twice.
My System SpecsSystem Spec
25 Feb 2012   #6

XIPv3 on Windows XP SP3 x86
 
 

Quote   Quote: Originally Posted by kapz View Post
Thanks Joe for the reply but I want to start the cmd as a normal user and get the admin privilege later for the same command prompt. This approach will start the cmd as admin (or the specific user)
Hi kapz,
Sorry for misunderstanding. This can be done using the following command.

Code:
runas /user:(UserNameHere) CMD.exe

Thank you
My System SpecsSystem Spec
25 Feb 2012   #7

Windows 7 Ultimate x86
 
 

Thanks all for your kind replies!

Quote   Quote: Originally Posted by JoeMJV View Post
Hi kapz,
Sorry for misunderstanding. This can be done using the following command.

Code:
runas /user:(UserNameHere) CMD.exe

Thank you
This worked to some extent. Thanks!
My System SpecsSystem Spec
25 Feb 2012   #8

W7 Pro SP1 64bit
 
 

If you are looking to keep all of the code in one cmd window because of variables and/or environment settings, then you can try the work around mentioned by CatBus near the bottom of this thread.

Or you can use some of the scripting tools mentioned in this old technet article. e.g. AutoIt3 has the ability to gather the results from one CMD window and use them in another.
My System SpecsSystem Spec
01 Jun 2013   #9

windows 7
 
 

Quote   Quote: Originally Posted by JoeMJV View Post
Quote   Quote: Originally Posted by kapz View Post
Thanks Joe for the reply but I want to start the cmd as a normal user and get the admin privilege later for the same command prompt. This approach will start the cmd as admin (or the specific user)
Hi kapz,
Sorry for misunderstanding. This can be done using the following command.
Code:
runas /user:(UserNameHere) CMD.exe
Thank you
I am using this In a batchfile "runas /userUserNameHere) CMD.exe". It ask to type a password. How can I put the password Into the batch file too?
My System SpecsSystem Spec
26 Jul 2013   #10

Windos 7 Ultimate x64
 
 

Hello guys. this method doesn't work for me because it asks me pass but my account doesn't have pass. After I hit enter, it doens't run.
My System SpecsSystem Spec
Reply

 How to change to Admin mode in CMD ?




Thread Tools



Similar help and support threads for2: How to change to Admin mode in CMD ?
Thread Forum
How do I change admin user? General Discussion
Solved Although i am the Admin , Can't change my wallpaper !! Customization
Need some help with admin mode General Discussion
When to Install as Admin and Compat Mode Gaming
how to change dns without admin rights? Network & Sharing
Admin not able to change UAC type System Security
Cant Change to Full Admin 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 07:42 PM.
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