This article does not have the technical content, also not big on, but think, still write down, certainly someone will use to get.
Often play system friends, should know the Shell instructions, this is a very fun and magical instructions. With it, you can easily open some special directories in the system with short words.
For example, you enter in the "Run" window or "File Manager" in the Address bar:
Shell:sendto
After you enter, you will see the "Send to" directory being opened.
Again, for example, you type:
Shell:system
When you enter, the System32 directory is opened.
Note that the shell is followed by a colon (an English colon), and then the abbreviation for the special directory, which is not case-sensitive.
To give you a more visual view of which shell instructions are supported by Windows 10, the old week is directly on the code, which reads a list of the names of the special directories in the system.
Please look at the code.
//read out these funny directories from the registryRegistryKey Fsdescs = Registry.LocalMachine.OpenSubKey (@"software\microsoft\windows\currentversion\explorer\folderdescriptions"); //get a list of sub-keys string[] subkeys =Fsdescs. Getsubkeynames (); //read the value of "Name" one by one foreach(stringSinchsubkeys) { Try { //to open a subkey that is identified by a GUIDRegistryKey Guidkey =Fsdescs. OpenSubKey (s); //Take value stringval = Guidkey.getvalue ("Name") as string??string. Empty; //Add to Collection_obsstrcols.add ($"Shell:{val}"); Guidkey.dispose (); } Catch{Continue; } } Fsdescs. Dispose ();
Oh, by the way, to open a directory directly in the code, you can use the Start method of the Process class. This method is very powerful, you pass the file path, or URI, or shell instruction, or protocol path, it can open, do not have to pass the. exe file path.
Then you can see for yourself.
You can open the corresponding directory by simply linking to the window.
Source code Well, click here to download->> down below.
Well, no technical level of the article finished, do not want to see can not see, but not spray, spray is a non-parenting behavior, to a fine of 250 yuan.
Shell directives in Windows 10