How to enter command prompt with elevated priviledges at run?

  • Thread starter controlswhiz
  • Start date
In summary, the conversation discusses different ways to run a command prompt as an administrator in Windows. Options include using the "run as administrator" function, creating a shortcut and setting it to run as an administrator, using the "runas" command, or using the shortcut Ctrl+Shift+Enter.
  • #1
controlswhiz
7
1
What the title says.
 
Computer science news on Phys.org
  • #2
With windows, you select "run as admnistrator".
 
  • #3
run-command-prompt-as-administrator.jpg


just in case
step3: Right click where it says command prompt
 
  • #4
Is there any keyword that I can add on the run command?
 

Attachments

  • abcd.png
    abcd.png
    5.8 KB · Views: 454
  • #5
controlswhiz said:
Is there any keyword that I can add on the run command?
I don't think so.
Can't you just put a shortcut on the desktop(If you find it difficult to use start menu.)?
It's in C:\Windows\System32 ... Name is cmd.exe
  1. Find it
  2. Right click on it
  3. Hover mouse over "Send to"
  4. Choose "Desktop(Create shortcut)"

Then you can simply run it as an administrator by right clicking on the shortcut

Hey Routaran, what kind of font are you using?
 
  • #6
@adjacent: the font in the image? I have no idea, I shamelessly googled and posted an image from elsewhere on the internet as if it were my own. Sh*t, isn't that something you get hit with the banning stick for?
I think the person who made that image had shadows turned on for their text.

@controlswhiz: I don't think so either. the "-n" or "/help" options you enter after the file name are arguments you pass to the program that is being run. These are not interpreted by windows at all, they are specifically used the program in question. You need to tell windows to run a program elevated, not the program.

So, you have to launch the program by using the right click menu "Run as administrator" or use the method that adjacent posted.
I would add one extra step.
Right click on the shortcut>compatibility tab and check on "Run this program as an administrator"

this way you can simply double click the shortcut and it will run the command prompt elevated
image attached is an example of what you need to do.
 

Attachments

  • 2014-03-31 04_10_06-Dwarf Fortress Properties.jpg
    2014-03-31 04_10_06-Dwarf Fortress Properties.jpg
    33.4 KB · Views: 468
Last edited:
  • #7
You can try "runas" : http://superuser.com/questions/42537/is-there-any-sudo-command-for-windows

They say something like
Code:
runas /noprofile /user:Administrator cmd

In which case i'd make a "acmd.bat" file in your system32 directory with that in it, so you can just type acmd at the run box.

"Administrator" may need to be your user profile name if you have admin privs.
 
Last edited:
  • Like
Likes 1 person
  • #8
I usually just type "cmd" in the start search, and then ctrl-shift-enter to launch the selected program as an admin. No mouse use, funny settings, or extra shortcuts required.
 
  • Like
Likes 1 person
  • #9
cjl said:
I usually just type "cmd" in the start search, and then ctrl-shift-enter to launch the selected program as an admin. No mouse use, funny settings, or extra shortcuts required.

I did not know about the Ctrl+Shift+Enter shortcut. Great tip!
 

1. How do I open Command Prompt with elevated privileges?

To open Command Prompt with elevated privileges, you can right-click on the Command Prompt icon or search for "Command Prompt" in the start menu and select "Run as administrator". This will open Command Prompt with elevated privileges.

2. What are elevated privileges in Command Prompt?

Elevated privileges in Command Prompt refer to administrative privileges that allow a user to run commands and make changes to the system that require special permissions. This is usually required when performing tasks such as installing software or making system changes.

3. Can I enter elevated privileges at run without using the Command Prompt icon?

Yes, you can enter elevated privileges at run without using the Command Prompt icon by pressing the Windows key + R on your keyboard to open the Run dialog box. Then, type "cmd" and press Ctrl + Shift + Enter to open Command Prompt with elevated privileges.

4. How can I check if I have elevated privileges in Command Prompt?

You can check if you have elevated privileges in Command Prompt by typing "whoami" and pressing Enter. If the output says "Administrator", then you have elevated privileges. If it says "User" or your username, then you do not have elevated privileges.

5. Is it safe to run commands with elevated privileges in Command Prompt?

Running commands with elevated privileges in Command Prompt should be done with caution as it has the potential to make changes to the system that can affect its stability. It is recommended to only use elevated privileges when necessary and to be careful when executing commands to avoid any unintended consequences.

Similar threads

  • Computing and Technology
Replies
6
Views
2K
  • Programming and Computer Science
Replies
14
Views
1K
Replies
19
Views
1K
  • Computing and Technology
Replies
6
Views
1K
  • Programming and Computer Science
Replies
1
Views
209
Replies
16
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
Replies
9
Views
2K
Replies
3
Views
1K
  • Programming and Computer Science
Replies
1
Views
444
Back
Top