Win7 file association File and program "marriage"

Source: Internet
Author: User

Meet a friend urgent help: The system is windows7, this friend because the desktop does not have Office icons, but also anxious to use Word, a desktop icon right click, select the Open way to select Word, and did not "always use this program to open the same type of file" before the hook removed. After this change, all the shortcuts are turned into Word documents. Can be changed to something else, such as a notepad to open, but there is no way to restore the original state.

This is a file-related issue. Such a problem is simply impossible under XP, and it seems that this particular problem is a new problem under the Win7. On the Internet, found that the problem is not just this friend, seems to have to solve the need.

In order to solve this problem, we need to first talk about the basic knowledge of the file association, so that friends can know the reason why.

File associations, primarily by associating file types with open commands. Windows uses file extensions to identify file types, which first requires associating the extension with the file type.

ASSOC command

To modify the association of an extension with a file type, we need to use a command: Assoc

Point start, search, enter cmd, open cmd, enter in cmd: Assoc/? Enter. We can get help with this command.

The ASSOC command has two functions, one is to display an association between the extension and the file type, and one is to overwrite the extension with the file type.

Let's take a shortcut's association as an example to tell the problem.

The extension of the shortcut is. lnk, which is generally not visible under Windows, and if so, it must be a problem with its file association.

We entered in CMD: Assoc. lnk, the result of the command we can get when we enter:. Lnk=lnkfile. This command result shows that the extension. lnk is associated with the file type Lnkfile. All files with the. lnk extension belong to the Lnkfile file type.

Now let's enter the command: Assoc. Lnk=lnk, press ENTER, and the association of the extension with the file type is overwritten. And then we'll type in the command: Assoc. lnk, press ENTER, and the result of our command will be:. Lnk=lnk, the result shows that the extension. lnk is already associated with the file type LNK and is no longer associated with lnkfile.

This time you go to the desktop to see, the suffix name of all shortcuts on your desktop. LNK is all displayed, and all shortcuts are no longer available. When you double-click, you are prompted that Windows cannot open this file.

Now let us enter: Assoc. lnk=lnkfile, press ENTER, we will find that everything is back to the original.

In summary, if there is a problem with the association between the extension of the shortcut and the file type, we only need to enter: Assoc. lnk=lnkfile, and then return to the problem.

So, if we know the correct file type that the extension belongs to, when there is a problem with the association between the extension and the file type, we only need to enter: Assoc. ext=filetype, press ENTER. This. ext represents the file name extension, such as. lnk, which represents the file type, such as lnkfile. FileType. If we don't know what type of file the extension is associated with, we just need to type in CMD: Assoc. ext carriage Return. We can get the type of file it is associated with.

Each registered extension will have a corresponding registry key in the registry: Hkey_classes_root.ext,

Here's. ext represents the extension, such as the corresponding item of the shortcut: Hkey_classes_root.lnk, this item has a default value, the default value of the data, is the shortcut associated with the file type. Thus Assoc command, the main thing is to modify the default value of this item data. It should be noted, however, that the content modified by the Assoc command is not just the data for the default value of the item, but it will also modify some other aspects. So we can change the data of this value directly in the registry, and we can't completely replace the Assoc command.

        Note : more Wonderful tutorials please focus on the Triple computer Tutorials section, triple Computer office group: 189034526 Welcome to join

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.