I do like Notepad++, but I hate its icon. I'm very happy with Windows icons for txt/ini/... files, and would like to keep them. How can I associate Notepad++ with all supported filetypes without changing icons? With Notepad2, the problem did not occur.

  • 4
    I think it is is great so many people come here to change the Notepad++ icon!
    – Dude0001
    Sep 7 '16 at 13:29

Here's a quick answer that works perfectly. It's based on @bubu's answer, but massively simplified to make it easier:

  1. Open RegEdit
  2. Go to HKEY_CLASSES_ROOT\Applications\notepad++.exe\DefaultIcon (If DefaultIcon doesn't exist, create it under New > key)
  3. Create a new string value and set it to C:\Windows\System32\Shell32.dll,70

It should look something like this when you're done:

enter image description here

This will set ALL files associated with NotePad++ to the default .txt icon in Windows 10. (The text document icon is the 70th icon in Shell32.dll.)

Simply sign out and back in to see the change.

enter image description here

For other versions of Windows the .txt icon won't be the 70th one, so to pick the one you want, simply open Shell32.dll after selecting "Change Icon", and count to the icon you want to use like so:

1  5  9   13
2  6  10  14
3  7  11  etc
4  8  12
  • 6
    That worked fine. Note that you don't have to sign out to refresh the Icon cache, you can simply refresh it via command line: For Windows 7 and 8 use %windir%\system32\ie4uinit.exe -ClearIconCache. For Windows 10 use %windir%\system32\ie4uinit.exe -show.
    – JC2k8
    Apr 14 '16 at 6:41
  • 1
    @JC2k8 The command didn't work for me, but relogging did.
    – mbomb007
    May 23 '17 at 21:37
  • Works fine but I had to use C:\Windows\System32\Notepad.exe instead of C:\Windows\System32\Shell32.dll. Dec 26 '17 at 15:46
  • Instead of browsing the path in 'regedit', You can also create a .reg file and double click it to add it to registry as shown here Feb 14 '18 at 7:41
  • I'm trying to get this working on Windows 7, and it's not working for me. No matter what I change the image to in the registry, I do not see any results after relogging... I have the 64 bit version of Notepad++
    – mbomb007
    Jul 22 '18 at 20:17

You can adjust the icon by editing the registry:

How to Change the Icon for a File Type in Windows 7 and Vista

Ramesh Srinivasan

Windows XP and earlier Operating Systems include the most useful File Types tab in the Folder Options applet. This tab was removed in Windows Vista and Windows 7 and replaced by Default Programs, which lacks many features that the File Types tab has. This forced users to look for third-party utilities to manage file type associations and customize the icons. This article provides information on how to manually change the icon for file types in Windows 7 and Vista. Tired of editing the registry? You can automate the following task using Default Programs Editor. See our recent article Using Default Programs Editor to Change File Type Icons in Windows 7 and Windows Vista Customizing the Icon for a File Type

(For illustrative purposes, let’s assume that you have a custom file type .abc (for purposes of illustration) for which you want to change the icon.

  1. Click Start, type Regedit.exe and press ENTER
  2. Navigate to the following branch: HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ FileExts \ .abc \ UserChoice
  3. In the right-pane, note down the value data for Progid (e.g. abcfile). This is the user chosen (via Default Programs) Programmatic Identifier for the file extension.
  4. If the UserChoice branch does not exist, navigate to the following branch: HKEY_CLASSES_ROOT \ .abc
  5. In the right-pane, note down the (default) value data (e.g. abcfile). This is the Prog ID for the file extension.
  6. Navigate to the following key (where abcfile is the Prog ID noted in Step 2 or Step 4 above): HKEY_CLASSES_ROOT \ abcfile \ DefaultIcon Note: If the DefaultIcon key does not exist by default, you need to create it manually.
  7. In the right-pane, double-click (default) and mention the path to your custom icon (.ico file or reference to an icon resource from a EXE/DLL file).

Hint: You may use the icon picker dialog box to choose an icon from a EXE/DLL file. To launch the icon picker dialog:

  • right-click on a folder in your system
  • click Properties.
  • Click the Customize tab
  • Click Change Icon… button.
  • Use the icon picker to choose the icon and make a note of the index. The index starts from "0" and you need to proceed vertically when counting (top to bottom.)

One you note the icon index, simply cancel the icon picker dialog and close folder properties dialog.

For example, to set the 260th icon in Shell32.dll (contains a text pad icon), type the following path:

8.Exit the Registry Editor.

Restart Windows for the icon change to take effect. In case it doesn't, you can force a icon refresh manually, or try rebuilding the icon cache using Disk Cleanup.

Source: http://www.winhelponline.com/blog/change-file-type-icon-windows-7-and-vista/

  • 1
    Thanks, but the problem is that I'll have to do this for every single file associated with notepad++... +1 anyway =)
    – Clément
    Dec 16 '10 at 21:48
  • Would this work for Windows 10?
    – K.Mulier
    Dec 10 '17 at 16:52

You can use Resource Hacker to replace the original notepad++ icon with an .ico file of your liking. I don't know if Windows will then use the new icon as icons for .txt files though.

Update: You can also use Resource Hacker to extract the original .txt File icon from shell32.dll. For me it was icon number 763.


I had the same problem when I installed the latest 64bit version (I had upgraded my 32bit version I had), which was v7.2.2, and all my icons were now the ugly green ones. So I went back and installed v7.0 which changed my icons back to the normal, paper looking icons. Then I used the UPDATE option from within the program to update it up to the latest version, which doesn't alter your icons. So now I am back up to 7.2.2 minus the ugly green icons for my text files.

This is also safer than resource hacking or manually editing with regedit.


Do the following:

  • Change notepad++.exe to notepad.exe
  • Copy it to windows/system32/ (only notepad++.exe)
  • Copy SciLexer.dll to /windows/SysWOW64/ (if your OS is 64bit)
  • Make a new blank file allowAppDataPlugins.xml in /windows/SysWOW64/
  • Copy the other files to C:\Users\Administrator\AppData\Roaming\Notepad++\

That's all, the icon has not changed

  • 1
    Not great when you want to update Notepad++ though Sep 20 '15 at 12:23

In Windows 10, Notepad++ keeps hijacking the icons of filetypes that you open (by default) in Notepad++. It was very difficult to break that behaviour, but I finally got it working!



1. Registry permissions
Open the Windos registry, and give yourself enough "permissions" for the folders HKEY_CLASSES_ROOT and HKEY_CURRENT_USER. I'm not sure myself what are the minimum settings for the whole procedure to succeed. You've got to play a bit with the settings. Anytime you get an error message in the coming procedure, go back to this step and increase your registry permissions.

2. Make some custom icons
Make some custom icons, for example in the folder C:\ICONS\. I use the following website https://iconverticons.com/online/ to convert 256x256 png-files into ico-files.

3. Install Notepad++
Just get Notepad++. Nothing special here.

4. Open a terminal with admin rights
Type cmd in the windows search bar. Right click on the CMD-icon that appears and choose "Run as administrator" in the popup window.


Registry hacking

Disclaimer: changing your registry can potentially cause damage to your Windows installation. I have written down the procedure below with best intentions, but I deny any responsibility in case something goes wrong.
Note: I DON'T recommend to use this procedure for .bat files. This is a very important file-type for Windows. So I don't know what would happen if you delete its standard registry keys.

The procedure below describes how to assign a custom icon - which you created in C:\ICONS\abcfile.ico - to all *.abc files.

1. Registry hacking, part one
The first registry key you should add is HKEY_CLASSES_ROOT\.abc. In case this key already exists, you might want to delete it. Use the following command to delete the key and all its subkeys:


The following figure shows how we will (re)build this registry key and all its subkeys:

enter image description here

You can do it manually or run the following commands:

> REG ADD HKEY_CLASSES_ROOT\.abc /ve /t REG_SZ /d "abc_auto_file"
> REG ADD HKEY_CLASSES_ROOT\.abc /v BrowserFlags /t REG_DWORD /d 0x00000000
> REG ADD HKEY_CLASSES_ROOT\.abc /v EditFlags /t REG_DWORD /d 0x00000000
> REG ADD HKEY_CLASSES_ROOT\.abc /v PerceivedType /t REG_SZ /d "text"
> REG ADD HKEY_CLASSES_ROOT\.abc\DefaultIcon /ve /t REG_SZ /d "C:\ICONS\abcfile.ico,0"

2. Registry hacking, part two
The second registry key you should add is HKEY_CLASSES_ROOT\abc_auto_file. In case this key already exists, you might want to delete it. Use the following command to delete the key and all its subkeys:


The following figure shows how we will (re)build this registry key and all its subkeys:

enter image description here

You can do it manually or run the following commands:

> REG ADD HKEY_CLASSES_ROOT\abc_auto_file /ve /t REG_SZ
> REG ADD HKEY_CLASSES_ROOT\abc_auto_file\DefaultIcon /ve /t REG_SZ /d "C:\ICONS\abcfile.ico"
> REG ADD HKEY_CLASSES_ROOT\abc_auto_file\shell /ve /t REG_SZ
> REG ADD HKEY_CLASSES_ROOT\abc_auto_file\shell\edit /ve /t REG_SZ
> REG ADD HKEY_CLASSES_ROOT\abc_auto_file\shell\edit\command /ve /t 
> REG_EXPAND_SZ /d "\"C:\Program Files (x86)\Notepad++\notepad++.exe\" \"^%1\""
> REG ADD HKEY_CLASSES_ROOT\abc_auto_file\shell\open /ve /t REG_SZ
> REG ADD HKEY_CLASSES_ROOT\abc_auto_file\shell\open\command /ve /t 
> REG_EXPAND_SZ /d "\"C:\Program Files (x86)\Notepad++\notepad++.exe\" \"^%1\""

3. Registry hacking, part three
The second registry key you should add is HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.abc. In case this key already exists, you might want to delete it. Use the following command to delete the key and all its subkeys:

> REG DELETE HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.abc /f

The following figure shows how we will (re)build this registry key and all its subkeys:

enter image description here

You can do it manually or run the following commands:

> REG ADD HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.abc /ve /t REG_SZ
> REG ADD HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.abc\OpenWithList /ve /t REG_SZ
> REG ADD HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.abc\OpenWithProgids /ve /t REG_SZ
> REG ADD HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.abc\OpenWithProgids /v "C:\Program Files (x86)\Notepad++\notepad++.exe" /t REG_NONE /d 0
> REG ADD HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.abc\OpenWithProgids /v abc_auto_file /t REG_NONE /d 0


Refresh icon cache

The following command should refresh the Windows icon cache:

> %windir%\system32\ie4uinit.exe -show


Assign Notepad++ to the filetype

I've noticed that - sometimes - the changes only take effect after assigning Notepad++ as the default program to open the filetype. This is how to do that:

  • Create a file with the given filetype, eg: myFile.abc
  • Right click on the file, and select "open with" >> "another app"
  • You should get a popup window like: enter image description here
  • Select Notepad++ as the default program



Normally the icon has changed now! And all files of that particular filetype will have the custom icon. They will open by default in Notepad++.

Perhaps you should again refresh the icon cache:

> %windir%\system32\ie4uinit.exe -show

or restart your system to let it take effect (although restarting wasn't needed for me).


This is based on 'Dijango' answer but should be easier for users. Create a text file with .reg extension inside notepad++ and paste following content to it:

Windows Registry Editor Version 5.00


Double Click on it and accept the warnings to add it to registry.

This will create a DefaultIcon key in HKEY_CLASSES_ROOT\Applications\notepad++.exe registry path.

The 70 is id of standard text file icon inside Shell32.dll. It seems its also the same number in Win7 or Win8. You can see list of icons from here (win7) or here(Win8).

  • Simple answer here.

    1. Go to Regedit.
    2. Type in Regedit address bar - \HKEY_CLASSES_ROOT\Notepad++_file\DefaultIcon
    3. Change the Value of DefaultIcon from (C:...) into ~ (%Sys...)
  • (Default) , REG_SZ , C:\Program Files (x86)\Notepad++\notepad++.exe,0

  • (Default) , REG_SZ , %SystemRoot%\system32\imageres.dll,-102

    1. Go to Windows Settings > Change default Program by extension > .txt > switch from Notepad++ into Notepad, and back to Notepad++ again. (Refreshing icon image)
    2. Done.

Here's a quick answer that works perfectly. It's based on @Django Reinhardt's answer, but updated to Windows 10 x64 version 1903:

As of this build, Notepad++'s registry entry and other application's registry entries are no longer under HKEY_CLASSES_ROOT\Applications\APPNAME, but rather are now directly under the HKEY_CLASSES_ROOT 'folder'. Also, on recent updates, Notepad++'s registry entry folder has been renamed to "Notepad++_file".

So, the new location of 'DefaultIcon' is: HKEY_CLASSES_ROOT\Notepad++_file\DefaultIcon

enter image description here

And, as of this version, the string has to be formatted as follows:


rather than the old:


So, the result should now look like this:

enter image description here

To whoever reads this in the future, I hope this helps! <3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.