Vista current directory open admin rights command line

  
        In Windows Vista, unless you completely disable UAC, you will often encounter a situation where you need to enable a command line window with administrator privileges for system level settings. We have introduced it several times before, such as administrators. Open the command line window and open a command line window as an administrator. However, the inconvenience is that the command line window opened in this way is located in the "\\Windows\\System32\\" directory by default. Objects are stored in a directory that is "deep". It is cumbersome to enter the "cd" command multiple times or a fairly long directory string to go to the target directory.
In fact, we can simplify this step, that is, similar operations to open the command line window with administrator rights are transferred to the right-click menu of the folder, so that when browsing to the corresponding directory in the resource manager needs to be operated Just select the directory and right click to select the corresponding operation, you can open the command line window with all administrator privileges running with administrator credentials in the current directory, thus improving the operation efficiency.
Opening a command line window with administrator privileges in the current directory
To do this, you need to perform a simple registry operation. You can copy the following to a text editor and save it as "somename.reg" , then double click to import it into the registry.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\\Directory\\shell\ unas]
@=”Open a command line window with administrator privileges”
[HKEY_CLASSES_ROOT\\Directory\\shell\ unas\\command]< Br> @=”cmd.exe /s /k pushd \\”%V\\”"
Or, download the registry modification file we provided directly.
After the setup is complete, you only need to find the corresponding directory in the Explorer, then right click on it and select "Open the command line window with administrator privileges", you can open it directly in the current directory. A command line window with administrator credentials.


Copyright © Windows knowledge All Rights Reserved