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
kapz

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
JoeMJV

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
kapz

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
Dwarf

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
seavixen32

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
JoeMJV

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
kapz

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
UsernameIssues

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
Billd59

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
Blick

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
Thread Forum
How do I change admin user?
My ex set up my notebook for me which runs windows 7. He set himself as the administrator and me as a standard user. As he's no longer about how do I switch me to admin instead of him? And no he won't give me his password to do it (I've asked)
General Discussion
Although i am the Admin , Can't change my wallpaper !!
Hi All , As i was asking before how can i Bypass admins control and change my permissions i already asked my IT Admin for that and i am now the Administrator , i can install\uninstall applications, update windows and using the laptop normally but still can't change my wallpaper!! to...
Customization
Need some help with admin mode
I checked my user account and I have only one and that is me, and it is listed as administrator but from time to time I get messages that a program has to be run in administrator mode.. the one I remember is Adobe flash update always fails becasue it say I ahve to be in admin mode... I am in admin...
General Discussion
When to Install as Admin and Compat Mode
Just generic questions here... As a matter of course, for older games (not sure what year to start for Win 7 compatibility issues, maybe 2008 or 9?), should you install, running as admin and setting compat mode for XP or Vista? Or should you check this site for specific titles, to see if its...
Gaming
how to change dns without admin rights?
Hi guys, i have some problems with dns or opendns at my uni's library. i cant enter some web site which is legal. i want to change dns numbers or how can i pass opendns blockers? i cant change dns without admin rights at network connections, and i cant open computer Computer Management....
Network & Sharing
Admin not able to change UAC type
I bought Vista x64 because of the free upgrade to Win7. After I updated I found that my two admin accounts were no longer admin, but standard. To make a too of a long story shorter, I was able to create a new admin account using net user adminitrator, but when I tried to make the other two accounts...
System Security


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 14:17.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App