Windows file association, open with list modify Registry Raiders

Source: Internet
Author: User

This is all the way to modify the registry. On the internet for half a day, and some only add file association methods, but not added to the open mode list of methods, and some have added to the file list method, but the use of the Control Panel-folder option. It's so hard to gathered up all, from adding file associations, to deleting file associations, fully manually modifying the registry to complete, for programmatic operation of the registry implementation.

Add File association: (Demo to add a *.LFW Format file association)

Add item ". LFW" in the HKEY_CLASSES_ROOT key

Set the default value for ". LFW" to "Lfwfile" (name can be taken)

Add Item "Lfwfile" under HKEY_CLASSES_ROOT

Add "DefaultIcon" and "shell" to the new item "Lfwfile"

Create an item "open" under the item "Shell" and "open" under "command"

The default value for the modified item "DefaultIcon" is the icon path, which is the icon for the file with the extension *.LFW:

Icon Path:

Modify the default value of the item "command" to be the program path

Program Path:

Add "%1" after the path, which means that the program with this path opens the. lfw file that you double-clicked.

Test results:

Create a new text document

Modify the extension to. lfw

Enter, the system will prompt, press OK directly. The icon will change to the following:

Double-click Open, then use the program "e:/Li Feng/vc/richeditview/debug/lfw.exe" to open it.

This is an example applet made by MFC, much like a text document, but not a text document.

Sample applet:

Text Document:

This time right click on it, select "Properties", select "Change" open mode, open the way inside will appear their newly added file type (but sometimes did not appear, do not know what reason).

To delete a file association type:

First remove the two keys

/hkey_classes_root/.lfw
/hkey_classes_root/lfwfile

So the file association is basically deleted, but in the open mode list still has the type, then delete the following key

/hkey_classes_root/applications/lfw.exe

The Lfw.exe here is the name of the application to which it is associated. This way, there is no type in the Open with list. But the icon for that type of file remains the same, and when I turn on my computer the next day, the icon disappears and I don't know if it will be removed until I restart my computer.

But there are still a few keys inside the residue record, the following six keys

==/hkey_current_user/software/microsoft/windows/currentversion/explorer/fileexts/.lfw

==/hkey_current_user/software/microsoft/windows/currentversion/explorer/recentdocs/.lfw
/hkey_current_user/software/microsoft/windows/shellnoroam/muicache

**/hkey_users/s-1-5-21-583907252-1383384898-725345543-1003/software/microsoft/windows/currentversion/explorer/ Fileexts/.lfw
**/hkey_users/s-1-5-21-583907252-1383384898-725345543-1003/software/microsoft/windows/currentversion/explorer/ Recentdocs/.lfw
/hkey_users/s-1-5-21-583907252-1383384898-725345543-1003/software/microsoft/windows/shellnoroam/muicache

When the deletion of the * * Number of the two keys, hit the = = number of the two keys will be automatically deleted, these four keys are open records of this type of file, with what type of open files of this type, will be recorded, in fact, these two keys can be used without the tube. The last key muicache do not know what to do with, hope to have to know the comrade pointing.

Windows file association, open with list modify Registry Raiders

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.