First, hold down the SHIFT key and right-click on the directory you want to reach. See, this time in the pop-up menu One more option, that is, "Open command Window Here", we click to open a look.
Second, but sometimes we need to open the command line with the administrator's permission, this time we need to add a script to facilitate the operation, you can copy the following code and then save in the. reg format.
Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\Directory\shell\runas]@="Open cmd here as Admin""HasLUAShield"=""[HKEY_CLASSES_ROOT\Directory\shell\runas\command]@="cmd.exe /s /k pushd \"%V\""[-HKEY_CLASSES_ROOT\Directory\Background\shell\runas][HKEY_CLASSES_ROOT\Directory\Background\shell\runas]@="Open cmd here as Admin""HasLUAShield"=""[HKEY_CLASSES_ROOT\Directory\Background\shell\runas\command]@="cmd.exe /s /k pushd \"%V\""[-HKEY_CLASSES_ROOT\Drive\shell\runas][HKEY_CLASSES_ROOT\Drive\shell\runas]@="Open cmd here as Admin""HasLUAShield"=""[HKEY_CLASSES_ROOT\Drive\shell\runas\command]
Run the saved reg file to import the registry
Windows 10 quickly opens a command line in the specified directory