How to change to Admin mode in CMD ?

Page 1 of 2 12 LastLast

  1. Posts : 3
    Windows 7 Ultimate x86
       #1

    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 Computer


  2. Posts : 14
    XIPv3 on Windows XP SP3 x86
       #2

    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 Computer


  3. Posts : 3
    Windows 7 Ultimate x86
    Thread Starter
       #3

    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 Computer


  4. Posts : 9,582
    Windows 8.1 Pro RTM x64
       #4

    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 Computer


  5. Posts : 7,730
    Windows 7 Ultimate SP1 64-Bit
       #5

    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 Computer


  6. Posts : 14
    XIPv3 on Windows XP SP3 x86
       #6

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


  7. Posts : 3
    Windows 7 Ultimate x86
    Thread Starter
       #7

    Thanks all for your kind replies!

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


  8. Posts : 10,485
    W7 Pro SP1 64bit
       #8

    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 Computer


  9. Posts : 5
    windows 7
       #9

    JoeMJV said:
    kapz said:
    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 Computer


  10. Posts : 21
    Windos 7 Ultimate x64
       #10

    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 Computer


 
Page 1 of 2 12 LastLast

  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 19:11.
Find Us