Shell directives in Windows 10

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.