Changing icon for one file extensions modifies it for another


  1. Posts : 2
    Windows 10
       #1

    Changing icon for one file extensions modifies it for another


    I am running into some issues trying to change the .ico file associated with a particular file extension. At the moment 2 extensions Rmd and R share the same icon (shown below).



    I launched FileTypesMan and here is the view for both R and Rmd extension


    I have an icon file which I have saved in the save location “rmarkdown_icon.ico”. I go back into FileTypesMan to try and change this, which seems to work


    The issue that both the R and Rmd extensions get changed (rather than just the Rmd extension)



    I have been attempting to change the icon with .Rmd using FileTypesMan but when I do it switches the icon associated with BOTH Rmd and R and I believe this is based on the "Rmd_auto_file" contained within the following path in regedit.

    HTML Code:
    Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.Rmd\OpenWithProgids
    As per my understanding based on some extensive Google searches, an icon is being attributed to everything that RStudio opens rather than a specific filetype (which is what we are trying to accomplish). I have attempted troubleshooting for quite some time and was wondering if anyone had successfully accomplished this.

    Does anyone have any insight to fix this?
      My Computer


  2. Posts : 920
    Windows 10 Pro
       #2

    My understanding of this is that there are 2 methods which could work.
    The first is probably the most involved and needs quite a bit of understanding of how the registry and applications work together.
    The second is the easier but that is relative to how well you understand how the registry works.
    So method 1 : Remove both extensions completely from the registry, then recreate them separately, one at a time and set up how the application handles them (including right-click, info shown in explorer, double clicking etc). This involves creating all the needed registry keys for all the actions.
    You could write down most of this as it is shown by Filetypesmanager in its many info pages or by looking at the existing keys.

    Method 2 : Find the application keys associated with the extensions and modify those. I don't mean the DefaultIcon key but the main Application key and sub-keys.

    I have successfully used the info shown by Filetypesmanager to track down and change the icons for .eml and .pdf and CdAudio this way, method 2, but its complicated, and easy to mess up your registry.

    As a closing comment....ALWAYS export a registry key to save the info before making changes, then if you mess up you can restore the keys from the backup. And also have recent disk image in case you screw up completely.

    There are some decent tutorials and guides on that there interwebs and even some Microsoft docs relating to registry editing that I strongly recommend reading. Good luck.
    Here I have found the Persistent Handler id (how the files are linked to the default app) for .eml files and changed the icon to suit me. By default Filetypesmanager cannot do this.
    Changing icon for one file extensions modifies it for another-reg1.png
    Changing icon for one file extensions modifies it for another-reg2.png
      My Computer


  3. Posts : 989
    Microsoft Windows 10 Home
       #3

    In the registry, do both HKCR\.rmd and HKCR\.r have the same (Default) value (Rmd_auto_file)?
    If so, that is why changing one icon changes both. The way to seperate them is to export HKCR\Rmd_auto_file, open the .reg file in a text editor, then search & replace 'Rmd_auto_file' with something like 'Rmd_auto_file2', then save & merge the modifed file, then change the (Default) value of one of the extensions to match the new AppID you've created. Then your icon modification should be unique to each filetype.

    Keith
      My Computer


  4. Posts : 2
    Windows 10
    Thread Starter
       #4

    KeithM said:
    In the registry, do both HKCR\.rmd and HKCR\.r have the same (Default) value (Rmd_auto_file)?
    If so, that is why changing one icon changes both. The way to seperate them is to export HKCR\Rmd_auto_file, open the .reg file in a text editor, then search & replace 'Rmd_auto_file' with something like 'Rmd_auto_file2', then save & merge the modifed file, then change the (Default) value of one of the extensions to match the new AppID you've created. Then your icon modification should be unique to each filetype.

    Keith
    Keith thanks for your response, to clarify they do not have the same Rmd_auto_file as default. Here is what the .R extension looks like


    Below are the keys for each (which I got by exporting and then opening in Notepad as suggested)

    for .Rmd Extension
    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\.Rmd]
    @="Rmd_auto_file"
    
    [HKEY_CLASSES_ROOT\.Rmd\OpenWithList]
    
    [HKEY_CLASSES_ROOT\.Rmd\OpenWithList\rstudio.exe]
    @=""
    for the .R extension
    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\.R]
    @="R_auto_file"
    
    [HKEY_CLASSES_ROOT\.R\OpenWithList]
    
    [HKEY_CLASSES_ROOT\.R\OpenWithList\rstudio.exe]
    @=""
    so the only thing they seem to have in common is they both open with the same program "rstudio.exe". I tried renaming anyways but it did not change anything.
      My Computer


  5. Posts : 989
    Microsoft Windows 10 Home
       #5

    Ok, can you post the registry exports for HKCR\R_auto_file and HKCR\Rmd_auto_file?

    Keith
      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 04:54.
Find Us




Windows 10 Forums