Right-click cygwin and choose "Step by Step" from the menu. Step 1: Modify the windows registry 1 · start-> Run (or win key + R), enter REGEDIT, press enter to open the Registry Editor; 2 · find HKEY_CLASSES_ROOT \ Directory \ Background \ shell; 3. Right-click shell and choose "New"> "item". The name is displayed in the right-click menu and can be written as needed. Enter "OpenCygwin" and press Enter. 4. Right-click the newly created "OpenCygwin" and choose "New"> "item". The name cannot be messy. Enter "command" and press Enter. The window on the right will display a key value of the "default" type "REG_SZ"; 5. Double-click the "default" to modify the value data, enter the startup script path of Cygwin, for example, my "D: \ Dev \ Cygwin. bat % V ", remove the quotation marks and write them for confirmation. 6. OK. Right-click the folder and you will see an option named "OpenCygwin. Don't rush. An error will be prompted. continue to the next step. Step 2: Modify the Cygwin STARTUP script and environment variable 1. Modify Cygwin. bat file, as follows: @ echo off set _ T = % * # the key here is to add this sentence D: chdir D: \ Dev \ Cygwin \ bin bash -- login-I 2. modify. bash_profile file. In the home \ (User Name) directory, add the following file to the end: export _ T =$ {_ T // \\//} # replace backslash to fowardslash if [[$ _ T = ""]; then export _ T = "c:/Users/Administrator" fi cd "$ _ T". Now, save the modified file, right-click the folder, and select "OpenCygwin ", is it in the current directory. Cyper Note: The test passes in win7 64-Bit mode.