File Associations How to determine the target program file

Page 2 of 2 FirstFirst 12

  1. Posts : 21
    Win 10 64bit
    Thread Starter
       #11

    Thanks once again for all the comments.

    My computer has a fairly large number of programs installed and I guess the number of file extensions is reasonably large compared to the average.

    Can you give me any educated guess as to the size of the ftype.txt file before I try this?

    Thanks again

    Peter
      My Computer


  2. Posts : 20
       #12

    Both assoc and ftype commands take a few seconds to run, so it's not a very exhaustive list. Have a look in regedit at the list.
      My Computer


  3. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #13

    Hello @Mexicanpete,

    Mexicanpete said:
    Can you give me any educated guess as to the size of the ftype.txt file before I try this?
    I just ran them BOTH and one was 7KB and the other was 21KB.

    I hope this helps!
      My Computer


  4. Posts : 16,950
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #14

    BurrWalnut said:
    A file extension, say, txt is associated to a file type (txtfile), which in turn can open a specific program (Notepad) when the file is double-clicked or double-tapped. This will produce a list of them all:

    1. Display all extensions and their associated file types by firstly copying the following 4 lines:
    assoc >"%userprofile%\desktop\assoc.txt
    start notepad "%userprofile%\desktop\assoc.txt
    exit
    cls

    Now open Command Prompt (Admin). Using the mouse right-click, paste the 4 copied lines to the Command Prompt window. A .txt file is created on the Desktop and Notepad will open and display the list. The list represents the registry keys located in the merged HKEY_CLASSES_ROOT. In the left pane (using regedit), look for the extension, for example .txt. The (Default) field in the right pane contains the file type, e.g. txtfile.

    2. Now display all file types and their associated programs by substituting the above 4 lines with these:
    ftype >"%userprofile%\desktop\ftype.txt
    start notepad "%userprofile%\desktop\ftype.txt
    exit
    cls

    Another .txt file is created on the Desktop and Notepad will open and display it. This list represents the registry keys in HKEY_CLASSES_ROOT further down beyond the extensions using regedit. Look for the file type, for example txtfile, then click or tap shell\open\command. In the right pane, the (Default) field shows the full path of the program that opens it, e.g. notepad.

    3. NOTE. In operation, any keys in HKEY_CURRENT_USER\Software\Classes (current user) take precedence over those in HKEY_LOCAL_MACHINE\Software\Classes (all users) and both keys appear as the merged HKEY_CLASSES_ROOT. Any changes should be made to HKCU and HKLM. The HKEY_CLASSES_ROOT keys are intended to be read from, not written to.
    Burr,

    %userprofile%\desktop will fail to find the path for a relocated Desktop folder.

    You would need to incorporate the batch method shown in Find the user Desktop folder path - PS, vbs, batch methods - TenForums

    Denis
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 07:54.
Find Us




Windows 10 Forums