1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

WinXP File Associations

Discussion in 'Windows XP' started by Mosaic1, Dec 31, 2002.

Thread Status:
Not open for further replies.
Advertisement
  1. Mosaic1

    Mosaic1 Thread Starter

    Joined:
    Aug 17, 2001
    Messages:
    7,486
    This may be old news for the experienced Win2k users. For us Win9x users who are new to NT, it is something very different. The way File associations are set is different in Windows XP.

    I tried changing the file association for text files by importing a registry file for this key.

    HKEY_CLASSES_ROOT\txtfile\shell\open\command

    The file imported, and the command default was changed to the new program I wanted to use. But the file association didn't change. The old program still opened the file.

    I went into Folder Options>File Types. The older File association was still listed there. It hadn't changed. I changed the association using the File Types Page in Folder Options to use yet another program to open text files. That did work. However, I found that the command default in the registry was not updated when the association was changed. I rebooted to see if the command would be updated. It wasn't. But the file association had been set. What Folder Options listed didn't agree with the default value of the registry key once again.

    HKEY_CLASSES_ROOT\txtfile\shell\open\command

    Here's why:

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts

    Find the file extension you want to change. In this case .txt

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt

    Click on .txt and in the right pane there will be a String Value named Application. Modify its value to the name of the executable you want to use. No path. Just Notepad.exe or EditPad.exe or Wordpad.exe etc. If there is not a String Value named Application, create it.
    I like to keep things organized in the Registry, so I also do change the Default value for

    HKEY_CLASSES_ROOT\txtfile\shell\open\command

    to reflect the current program in use for the filetype.


    But the FileExts key is what counts. The data for the Application String value is the program which will open the file. If the Application String is not there or there is no program listed, then the command default in HKCR key is used. In this case, for text files:


    HKEY_CLASSES_ROOT\txtfile\shell\open\command


    Graphics files are special. If there is no value set in the Application String Value, then Preview is the default and they are opened in the default Windows Picture and Fax Viewer no matter what the HKCU\giffile\shell\open\command default value lists.
    This gets a bit confusing. To start, you can just set the Application value to agree with the default command in HKCR to avoid confusion.


    I found this on the internet.

    Do that first and then make the change you like.

    For Graphics files if for example Iexplore.exe is set to Application in the FileExts Key, Open will be the default. But the context menu will also have an entry called Preview. You can still open the file in the Windows Picture and Fax Viewer using the Preview entry.

    If you use the Registry or the right click open with to change the file association, the icon won't change. If you want to change the icon, either use Folder Options or change the default icon value here, for example

    HKEY_CLASSES_ROOT\txtfile\DefaultIcon

    Set the default value data to the path to the icon you want to use. You will most likely need to flush the icon cache for the icon change to show. Go to Display Properties>Appearance>Advanced and reset the icon size. Apply. The icons will be changed. Go back in. Change it back to the size you like to use.

    Note: If you find any more file types with special rules, and you just might. .. We love Windows! We love Windows! We love windows! LOL

    Thanks Bill.
     
  2. Mosaic1

    Mosaic1 Thread Starter

    Joined:
    Aug 17, 2001
    Messages:
    7,486
    This last post was about making changes using the Registry. some people like to back up registry files and use them to revert. That's good. but the FileExts key is the one to backup as well.

    Using Folder Options is the best way to deal with file associations for the average XP User. I wanted to make people aware that the Registry is not always going to reflect what you expect. And if you have a Graphics Program installed which has taken over all the Graphics File Associations, knowing where to look to change that hopefully will allow you to take them back. Especially if that graphics program doesn't give the choice of which file associations to set.
     
  3. bandit429

    bandit429

    Joined:
    Feb 11, 2002
    Messages:
    4,962
    Wow I'm gonna have to read that a million times to understand it.
    But its gotta be educational because its so hard for me to grasp.
    You must have put in a lot of effort,,,thanks.:)
     
  4. Rollin' Rog

    Rollin' Rog

    Joined:
    Dec 9, 2000
    Messages:
    45,855
    I think the gist of this is that unlike WinME and 9x the HKCR key doesn't really tell you what the working file association is. In XP it's handled on a "per user" basis and must be found under the HKCU key Mo' indicates. I discovered this after thrashing about the issue trying to find out why importing or changing the HKCR keys didn't change anything the way it did in 9x.

    Fortunately XP provides a very easy interface for changing file associations. Just right click on one and select "properties". You'll see where to go from there.
     
  5. Mosaic1

    Mosaic1 Thread Starter

    Joined:
    Aug 17, 2001
    Messages:
    7,486
    Rog,
    Yes. I am getting too long winded lately. I should not have told the whole story. LOL

    Pretty much what you said is the case. Looking in FileExts for the Association Value tells the story. If that is empty, the HKCR command default is used unless it is a graphics file. If it is a graphics file anf there is no Program listed in Association, the Windows default viewer is used.


    Mo
     
  6. Mosaic1

    Mosaic1 Thread Starter

    Joined:
    Aug 17, 2001
    Messages:
    7,486
    Thanks Rog. But I needed an editor on this one.
    Did you notice the date and time on your post? And all the subsequent posts in this thread are being shown ahead if it because of that time.

    (02-28-2023 12:00 AM)
     
  7. Rollin' Rog

    Rollin' Rog

    Joined:
    Dec 9, 2000
    Messages:
    45,855
    Looks like TG just adjusted the clock, I must have been caught in a time warp :) I better stop posting here until after 9pm pst...

    hmm, the date as well as the time, well I deleted it now.... or it would have been the last post until march 2003
     
  8. bandit429

    bandit429

    Joined:
    Feb 11, 2002
    Messages:
    4,962
    Well I appreciate the both of you,,, as it stands I really do not understand. I'm a basic, basic person. I need the longwinded and the gist and then the dictionary LOL. But you can be sure of one thing, I will go to the xp puter and back here until I do understand. If your gonna take time to post it I'm gonna take time to learn it. Thanks And Happy New Year!
     
  9. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/110727

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice