Timeline for How to open Command Prompt in a specific folder as Administrator?
Current License: CC BY-SA 3.0
19 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 15, 2020 at 18:10 | comment | added | barlop | @Technext you could look into what can be done with customizing the context menu, there may be some native or third party way to do that. | |
May 23, 2019 at 21:01 | review | Suggested edits | |||
May 23, 2019 at 21:28 | |||||
Aug 28, 2018 at 7:14 | comment | added | Technext |
Is there any way i can open this in any folder? When i click Shift + Right Click , i get Open command windows here. Can this somehow be customized to open the Administrator windows in whatever current folder i am in? I am using Windows Server 2016.
|
|
Sep 17, 2017 at 20:07 | comment | added | barlop |
@JasonXA Also, the idea that CD is outdated and pushd and popd are what one should use, is an interesting idea that I haven't heard before,.though the remaining disadvantage of pushd is the extra keystrokes. One could do doskey cd=pushd $* and doskey cdd=popd $* and then one would have an updated 'cd'. I still don't think pushd is an advantage in this case, and if anything using it on a UNC path here , when starting a cmd prompt, is a disadavantage as it gives some temporary drive letter that won't make it immediately clear what actual drive is being referenced.
|
|
Sep 17, 2017 at 19:57 | comment | added | barlop | @JasonXA You write "you can use the %cd% to get the mounted path. Again, without having to remember or retype full paths" <-- how is using that CD environment variable, an advantage of using the pushd command over using the cd command? | |
Sep 17, 2017 at 14:41 | comment | added | JasonXA | Yeah, but you advocate bad practices with outdated commands, the reason pushd might be preferred on top of full UNC compatibility is the ability to revert to previous location with popd without having to type the old path again, plus with pushd you don't need to reference network locations by drive. Once a location is set like \\network_host\path you can use the %cd% to get the mounted path. Again, without having to remember or retype full paths. CD was great once but gets outdated, slowly. | |
Sep 15, 2017 at 5:12 | comment | added | barlop | @JasonXA . So if one did use pushd there one might want to change the title of the cmd window too. And really if one was so organised as to create a cmd prompt specifically to access a drive, one would likely be organised enough to have made a permanent drive letter to that drive too, and therefore have no need for pushd. And the permanent drive letter will be far more familiar. pushd on a unc path is great when entered manually as you can see the command was entered not just the output in this case the fairly random drive letter. | |
Sep 15, 2017 at 5:10 | comment | added | barlop | @JasonXA furthermore, pushd will create a temporary network drive e.g. as mentioned here superuser.com/questions/282963/… plus you won't see the command in this case the pushd command, that was given.. So the cmd prompt would be there without showing clearly that it's on a network drive and which network drive it is on. the only indication would be a temporary drive letter that looks unfamiliar in terms of what location it refers to... | |
Sep 15, 2017 at 4:50 | comment | added | barlop | @JasonXA that has already been said in comment in the comment right above yours, as well as in the first comment. | |
Sep 15, 2017 at 2:53 | comment | added | JasonXA | cd /d still can't cover unc paths... so a moot point in fact | |
Sep 15, 2017 at 2:45 | review | Suggested edits | |||
Sep 15, 2017 at 3:54 | |||||
May 12, 2016 at 11:17 | audit | First posts | |||
May 12, 2016 at 11:19 | |||||
S Apr 22, 2016 at 6:27 | history | suggested | pacoverflow | CC BY-SA 3.0 |
Removed the uncertain tone of this answer.
|
Apr 21, 2016 at 23:38 | review | Suggested edits | |||
S Apr 22, 2016 at 6:27 | |||||
Apr 21, 2016 at 13:58 | comment | added | barlop | @ths pushd works for unc where cd doesn't, indeed. But your slight suggestion that cd won't change to other drives is incorrect, see cd /d (as you probably know). | |
Apr 21, 2016 at 13:56 | comment | added | Axel Kemper | To make the admin status more visible, window title and window color can be set. Example: `cmd.exe /K title Elevated && color 1a && cd /D c:` | |
Apr 21, 2016 at 6:39 | comment | added | ths | Instead of cd, use pushd, then it will also work on other drives than c: and even unc shares. | |
Apr 20, 2016 at 23:05 | vote | accept | AngryHacker | ||
Apr 20, 2016 at 22:43 | history | answered | barlop | CC BY-SA 3.0 |