Today, I encountered an interesting thing. When I set the default open method for the CSS style sheet, but it is always unable to be set successfully, the system always selects a random open method to open the file. For example, PDF, DW, and TXT.
Follow these steps to set the default open mode:
1. Right-click the CSS file and select the open mode. Then, select the default open mode in the open mode.
2. Select Browse in the pop-up box, find my installed sublime_text.exe, and click open.
3. Return to the opening mode dialog box and select "always open this file with the selected program". Then, click "OK ".
However, the strange thing is that the system selects a random open method as the default open method.
Cause:Later, with the help of my colleagues, I found the reason: I installed the sublime text 2 editor twice in C: \ Program Files \ sublime text 2 and D: \ Program Files \ sublime text 2, while c: \ Program Files \ sublime text 2 is set in the registry. Then I deleted the sublime text 2 folder in C: \ Program Files \, And the settings in the Registry are still in the C: \ Program Files \ sublime text 2 location, this is why sublime text 2 fails to be set as the default editor.
Solution:
1. Win + R enter Regedit in the running process, and press enter to open the registry.
2. Press Ctrl + F and enter sublime in the pop-up box. Click search on the right.
3,You will find hkey_classes-> *-> shell-> open with sublime text 2-> command. Double-click the default value on the right. In the pop-up window, the input value under "value data" should be "D: \ Program Files \ sublime text 2 \ sublime_text.exe "" % 1"
4,Then, press F3 to find the next one, hkey_classes-> sublime_text.exe-> shell-> open-> command, double-click the default value on the right, and the "C: \ Program Files \ sublime text 2 \ sublime_text.exe "" % 1 "to" D: \ Program Files \ sublime text 2 \ sublime_text.exe "" % 1 ", and then click OK.
Note: "value data" in the Registry refers to the directory of the editor you installed.
5. Click start to set the default open mode.