How to change the way Windows 7 system files are opened

Source: Internet
Author: User
Tags requires

Classmate Emergency help: The system is windows7, this classmate because the desktop does not have Office icon, but also anxious to use Word, a desktop icon right click, choose to open the 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 not possible under XP, and it seems that this particular problem is a new problem under Windows 7. On the Internet, found that the problem is not just this classmate, seems to have to solve the necessary.   In order to solve this problem, we need to first talk about the file related to some basic knowledge, so as to enable students to know it but know why.   First is file association, the main thing is to associate the file type with the Open command. Windows uses file extensions to identify file types, which first requires associating the extension with the file type.   ASSOC Command   To modify the extension associated with the file type, we need to use a command: Assoc point start, search, enter cmd, open cmd, in cmd input: 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 enter in CMD: Assoc. lnk carriage return, we can get the command result:. 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 us enter the command:   Assoc. lnk=lnk carriage return. lnk this extension is overwritten with the file type. Then we enter the command:   Assoc. lnk   Carriage return. The result of our command will be:   Lnk=lnk   This 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   Carriage return. 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   Enter to resolve the problem.   So, if we know the correct file type that the extension belongs to, when there is a problem with the association between this extension and the file type, we only need to enter:   Assoc. ext=filetype   Carriage return.   this. ext represents the file name 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 CMD: Assoc. ext carriage Return. We can get the type of file it is associated with.   Each registered extension will have a corresponding registry entry in the registry:   Hkey_classes_root.ext   here. ext represents the extension, such as the corresponding entry for the shortcut:   HKEY _classes_root.lnk   This item has a default value, and the data for this default value is the file type associated with this shortcut. 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.   FYTPE Command   We now know how to associate an extension with a file type, and further need to know how to associate a file type with an open command. For example, the. txt extension is associated with a file type that is txtfile, and txtfile in normal circumstances, always open with Notepad.exe (Notepad), which is the open command that opens the Txtfile file type.   How do you modify the association between this file type and the Open command? This requires another important command: ftype   Let us enter in cmd:   ftype/?   return. We can get help with this command. The   ftype command has two functions, one is to show the association between the file type and the Open command, and one is to overwrite the association between the file type and the Open command. &nbsP If we want to know what kind of open command a file type is associated with, we only need to enter in cmd:   ftype fileType   carriage return. We will be able to get the results we want. This filetype represents the specified file type, such as Lnkfile   Let us enter: Ftype lnkfile   carriage return. Under normal circumstances, the result of the command we obtained was that no file type "Lnkfile" or its associated open command was found. The result is that, in normal circumstances, Lnkfile is not associated with any open command.   Let us enter: Ftype lnkfile=notepad.exe   carriage return. Let us re-enter:   ftype lnkfile   carriage return, we will get the command result: Lnkfile=notepad.exe   This result indicates that the file type Lnkfile with the Open command notepad.exe Connected.   In this case, the shortcuts will still not be affected to open.   So, how do you clear this association and not associate with other open commands? We just enter:   ftype lnkfile=   return. Under XP, this command is invalid, however, we can enter under XP:   ftype lnkfile=   carriage return. This command and the previous command on the surface can hardly see the difference, is that the previous command in the = no space after, and then a command in the = after a space.   Let us enter:   ftype txtfile   carriage return. Under normal circumstances, we can get the command result:   txtfile= "%systemroot%system32notepad.exe"%1   This result indicates: File type txtfile and open command txtfile= "% Systemroot%system32notepad.exe '%1 is associated.   If there is a problem with the association between a file type and an open command, and we know what the correct open command is, then we just need to enter the following command in CMD and return to fix it:   ftype filetype= openCommandString   Here filetype represents the specified file type, such as Txtfile, where opencommandstring represents an open command, such as Notepad.exe   If there is a problem with the association between our txtfile and the Open command, we only need to enter in cmd:   ftype txtfile= "%systemroot%system32notepad.exe"%1   carriage return. In this way, we also fix the association between the txtfile file type and its open command.   The so-called open command, in fact, is the way to open this file type.   Each registered file type, there will be a corresponding registry key in the registry,   This registry entry is:   Hkey_classes_rootfiletype   This filetype represents the text Type, such as the registry key corresponding to the Batfile file type, is:   hkey_classes_rootbatfile   Ftype the registry key modified by the command is mainly---hkey_classes_ Rootfiletypeshell   Opencommand---The data for the default value of this item.   Note, however, that the ftype command modifies not just the data for this default value. Therefore, directly in the registry to modify this data, and can not replace the ftype command changes.   Of course, all the things that the ftype command modifies can be found in the registry, but we look at it one by one of the way, far better to use the ftype command to simply modify it.   Right-open way   We talked about the extension to the file type, the file type associated with the Open command (that is, how the file was opened), and it looks as if we've talked about file-related issues,   Actually, there's another important aspect we didn't There was talk. This is where we right-click a file, choose the open mode (not all the files have the right to open this option), then we select a program, and "Always use this program to open the same type of file" on the tick before the check, point confirmation. For example, the student at the beginning of this article, all the shortcuts are selected to open as a word program. After that, the file type is also associated with this open command.   FTYPE command is to modify the file type with theAn open command is associated, and the right key is open to also modify the relationship between the file type and the Open command.   We found that the ftype command and the right key to open the way, the two modified registry entries are different. The registry key modified by the Ftype command is:   Hkey_classes_rootfiletype   This filetype represents a file type, such as Hkey_classes_rootlnkfile   and the right key opens The main registry entries modified by the method are:   hkey_current_usersoftwaremicrosoftwindowscurrentversion   Explorerfileexts.ext   this. Ext represents the file name extension, such as:   hkey_current_usersoftwaremicrosoftwindowscurrentversion   Explorerfileexts.lnk   Press As I understand it, the contents of the Ftype command are set by the system, and the content modified by the right-open method belongs to the user settings, and the actual objects set are the same, and when the two are inconsistent, the user setting takes precedence over the system settings.     Three registry keys   in summary, file associations involve a registry key of three:   Hkey_classes_root.ext   Hkey_classes_rootfiletype   Hkey_current_usersoftwaremicrosoftwindowscurrentversion   Explorerfileexts.ext   Problem Solving   Now we're going back to what we said at the beginning. to the problem.   I taught that classmate first enter:   Assoc. lnk   Returns the command result is:  . Lnk=lnkfile   This indicates that the association between the extension. lnk and the file type Lnkfile does not ask Problem.   I want him again. Input:   ftype lnkfile returned command result:   did not find the file type "Lnkfile" orThe open command associated with it and the result is normal, which indicates that there is no problem with the association between the Lnkfile in the system setup and the Open command.   Then, the problem can only occur if there is an association between the Lnkfile in user settings and the Open command. In general, the right-open setting takes precedence over the settings associated with a file by the Ftype command, which is the same for XP and Windows 7, but the two are different for shortcuts with the. lnk extension. Under Windows 7, even for the. lnk shortcut, the setting with the right key is preferred over the setting of the Ftype command.   found the problem, we can know that for this fast way file association error, we use assoc and Ftype commands are not resolved. The solution is:   in the registry right to delete the following registry key:   Hkey_current_usersoftwaremicrosoftwindowscurrentversion   Explorerfil Eexts.lnkuserchoice   The values and data under this registry key (specifically the value named ProgID and its data) are the default open programs that are set by the right key open method.   After the deletion, restart the computer, or restart the explorer, the problem is perfectly resolved.   In addition to this solution, other solutions have not been found for the time being.   By the way, under XP, Userchoice This registry entry is not.   Because some files do not have the option to open the way, under XP, we can in my computer, the pastry tool----View----Folder Options---File type, where we can make the same settings, and under Windows 7, We can----Control Panel---program---the default program----always use the specified program to open this text type---Set up, XP settings are much more options, and Windows 7 settings are extremely concise. Limited to space, the specific settings will not speak.   Hey, with the above steps, you can change the way Windows 7 system files are opened!
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.