📜  如何在文件资源管理器中将文件添加到新文件 - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:49.250000             🧑  作者: Mango

代码示例1
=====================================================================
How to add more options to the "file" dropdown menu in file explorer
=====================================================================

1.  Search for "Registry Editor" in your taskbar and open the program.
2.  Go to HKEY_CLASSES_ROOT.
3.  Find a Key/folder named the same as your desired file extension (I will 
    refer to this key/folder as Key1 later). (If you can not find a your 
    desired file extension, go to "Segment1" further down in the tutorial).
4.  Right click the folder and choose "New > Key", then name it "ShellNew".
5.  On the right-hand side right click the background and add 
    "New > String Value", then name it "NullFile".
6.  Left click Key1 and right click the "(Default)" string and tap modify.
7.  Copy the string inside the "Value Data" input field (if there is 
    nothing in it, go to "Segment2" further down in the tutorial).
8.  Navigate to the key/folder named the thing you just copied from the
    "Data Value" input field. Click it.
9.  Right click the "(Default)" and tab modidy.
10. Input the name you want the file of the dropdown option to be 
    called. (this can be whatever).
11. Done! This should be it. Have a nice day!
    
---Segment1---
You have a file type that has not been defined by windows. The solution is easy.

1.  Right click "HKEY_CLASSES_ROOT" and choose "New > Key", then name the key to
    the file extension you want to add an option for. (F.eks. name the Key
    ".txt" if you want to add a text document).
2.  Continue at step 4.

---Segment2---
You are missing a Key. There is a very simple solution to this problem though.

1.  Right click "HKEY_CLASSES_ROOT" and choose "New > Key", then name the key to
    a name that you can remember (Or at least copy it for later).
2.  Go to Key1 and input this as the missing string in the 
    "(Default) > Value Data" input field.
3.  Now continue at step 8