Command Prompt is not one of those programs. Many programs let you permanently change their default privilege level from the Properties menu. That is why I am looking for a one-and-done solution that will let approved techniques 1 & 2 open administrator command prompts. As a programmer, lifting my hand is a strenuous task that causes me great physical pain.As a programmer, performing a pointless robotic task causes me great emotional pain.Performed several times a day, every day for the remainder of my career, it adds up to about ten days of lost time spent clicking and waiting and directory changing. This process is several milliseconds slower than either of my preferred methods.So I often have to change directories to get where I want to go. The window always opens in C:\windows\system32, rather than my Users directory (as in approved technique 1) or the folder I want to be in (as in approved technique 2).This is unacceptable for several reasons: Lift hand off the keyboard and put it on the mouse.In order to run administrator-only applications, I have to open the command line in this relatively laborious way: However, when I open the command window in either of these ways, I do not have the full administrator privileges that I feel I am entitled to. While in Explorer, hold Shift and right click on a folder, and choose "Open command window here".I typically open the command window in one of two ways: For example, I use iisreset to restart my local web server. Once you complete the steps, use the “Shift + F10” keyboard shortcut or right-click inside of a folder and choose the “Show more options” item to open the classic context menu to find the option to open the path in Command Prompt (admin), but with the admin console on Windows 11.As a developer, I often have the need to open a command prompt for various purposes. Right-click the “runas” key (folder), select New, and choose the Key option.ĭouble-click the Default string and set its value to cmd.exe /s /k pushd \"%V\". Name the key HasLUAShield and press Enter.ĭouble-click the newly created key and change its value to Top.ĭouble-click the newly created key and change its value to C:\\Windows\\System32\\cmd.exe. Name the key NoWorkingDirectory and press Enter. Right-click the “runas” key (folder), select New, and choose the String Value option. Right-click the “shell” key (folder), select New, and choose the Key option.ĭouble-click the “Default” string and set its value to Command Prompt (Admin). Navigate to the following path: HKEY_CLASSES_ROOT\Directory\Background\shell Search for regedit and click the top result to open the app. In this guide, you will learn the steps to add a new entry in the File Explorer (classic) context menu to open a specific path in Command Prompt as an administrator on Windows 11 (or Windows 10). However, if you must open a particular folder location in File Explorer with Command Prompt as an administrator to run an application, it’s possible to add an entry to the classic context menu through the Registry. On Windows 11, when you right-click inside a folder, you will find the option to open that File Explorer path in Command Prompt, but you won’t find an entry to open the console as an administrator. To add the option to open Command Prompt (admin) from File Explorer, create the “runas” key, set the default string as “Command Prompt (Admin),” create the “NoWorkingDirectory” and “HasLUAShield” strings, create and set the “Position” string to “Top,” create and set the “Icon” string to “C:\\Windows\\System32\\cmd.exe.” And create the “command” key and set the default string to “cmd.exe /s /k pushd \”%V\”” then restart the computer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |