encountered a friend urgent help: the system is windows7, this friend because the desktop does not have OFFICE icon, and eager to use WORD, right click on a desktop icon, select the open mode I chose Word, and I did not remove the checkmark from the "Use this program to open the same type of file". After this change, all the shortcuts turned out to be word documents. Can be changed to something else, such as the change to Notepad mode, but there is no way to restore the original.
This is a file association issue. Such a problem is simply not possible under xp. It seems that this specific problem is a new problem under Win7. I searched the Internet roughly and found that it was not just this friend who appeared to have such a problem. It seems that there is a need for a solution.
In order to solve this problem, we need to talk about some basic knowledge of file association so that our friends can know what they know.
File associations, the main thing is to associate file types with open commands. Windows recognizes the file type by its file extension. This first needs to associate the extension with the file type.
assoc command
To modify the association between extension and file type, we need to use a command: assoc
point to start, search, enter cmd, open cmd, enter cmcd in: assac /? . We can get help with this command.
The assoc command has two functions, one is to display the association between the extension and the file type, and the other is to rewrite the association between the extension and the file type.
Let's use the shortcut association as an example to illustrate this problem.
The extension of the shortcut is .lnk. Under Windows, this extension is generally not revealed. If it appears, it must be associated with a file.
We enter in the cmd: assoc.lnk, the result of the command we can get after the carriage return is: .lnk=lnkfile. The result of this command shows that the extension .lnk is associated with the file type lnkfile. Any file with a .lnk extension belongs to the lnkfile file type.
Now let's enter the command: assoc .lnk=lnk , press the Enter key, the lnk extension and the file type association will be rewritten. Then we enter the command: assoc .lnk, press the Enter key, the result of the command we get will be: .lnk=lnk , this result shows that the extension .lnk is already associated with the file type lnk, and no longer Is associated with lnkfile.
This time you go to the desktop to see it. The suffixes .lnk of all the shortcuts on your desktop are all displayed, and all shortcuts are no longer available. When you double-click, you will be prompted: Windows cannot open this file.
Now let's type: assoc .lnk=lnkfile , press the Enter key, we will find that everything has returned to its original state.
In short, 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, the problem can be solved after the carriage return.
This way, if we know the correct file type to which an extension belongs, when there is a problem with the association between this extension and the file type, we just need to type: assoc .ext=filetype , press back The car key can be. This .ext represents the file extension, such as .lnk, which represents the file type, such as lnkfile. If we don't know what type of file the extension is associated with, we just need to type in the cmd: assoc.ext to enter. We can get what the file type it is associated with.
Each registered extension will have a corresponding registry key in the registry: HKEY_CLASSES_ROOT.ext ,
The .ext here represents the extension, for example, the shortcut corresponds to: HKEY_CLASSES_ROOT .lnk , this item has a default value, the data of this default value is the file type associated with this shortcut. Therefore, the assoc command, the main thing is to modify the default value of this item. However, it should be noted that the content modified by the assoc command is not only the default value of the item, it will also modify other aspects. So we change the value of this value directly in the registry, and can not completely replace the assoc command.