How To Change The Edit Application In Windows - gHacks Tech News

How To Change The Edit Application In Windows

The Edit option pops up in Windows after right-clicking a file in Windows Explorer or another location on the system. If you select it, the file is opened in the associated program, e.g. Notepad if you right-click on a plain text file.

For image files it is usually Microsoft Paint while text documents are usually opened in Notepad.

Update: If you are using a newer version of Windows, you can perform a different operation if you don't mind association open with the program as well.

The easiest way to do that is to right-click a file of the file type you want to edit in a different program, select Open With from the context menu, and pick "choose another app" from the context menu afterwards.

Windows displays a list of programs that you can associate with the file type. Simple select one from the list or use the browser to pick a program from the system not listed by the operating system.

windows edit

Setting a new program to open the file type will not only open it directly if you double-click on it but also open it if you select the edit option. Update End

Those applications are set in the Windows Registry where they can be changed so that Edit will open a different application.

It is actually pretty easy to change the default edit application in Windows to another one providing you know where to look for in the Registry to make that change.

Now, to change the default Edit application open the Windows Registry by pressing [Windows R], typing [regedit] and hitting [enter]. Locate the following Registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations

system file associations

You find all the different file types Windows knows about and their association.

The order is filetype > shell > edit > command. Not every filetype has that chain but the most common ones do. To edit the default text editor in Windows you need to locate the text subkey and follow the path mentioned above until you reach the command key. There should be only one Default entry in there:

%SystemRoot%\system32\NOTEPAD.EXE %1

To change the program that opens when clicking on the Edit option in the right-click menu simply change the path so that it leads to the application that you want to use, for example

"c:\program files\notepad++\notepad++.exe" "%1"

Repeat the process for other file types that you want to change the edit option for. Restart the PC afterwards once you are done to apply the change.

Tip: Backup the Registry setting before you make changes so that you can restore the previous state if things go wrong. Do so by clicking on File > Export after selecting the SystemFileAssociations key as the root key.

Summary
How To Change The Edit Application In Windows
Article Name
How To Change The Edit Application In Windows
Description
Find out how to associate programs with the edit operation that you find listed in Windows Explorer's right-click context menu.
Author
Advertisement

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:


Previous Post: «
Next Post: »

Comments

  1. Alec_Burgess said on February 8, 2009 at 2:10 pm
    Reply

    The above works but isn’t it easier to just use right-click [Open With …], navigate to desired program and tick [Always use this program]?

    1. Martin said on February 8, 2009 at 2:20 pm
      Reply

      Alec: You sometimes have a default application and a handful of other applications that you use to open a certain file type. Say, you open images in your image viewer usually but sometimes want to use a different application to view them.

  2. Alec_Burgess said on February 8, 2009 at 2:13 pm
    Reply

    how do I edit to tick “notify followup via email” if forgotten in initial post?

    1. Martin said on February 8, 2009 at 2:21 pm
      Reply

      You cannot. All you can do is leave a second comment and check the box there.

  3. Paul_Bags said on July 21, 2011 at 7:34 am
    Reply

    What sucks is that there used to be a dialog for this. Sure, I could do it in the registry, but why did microsoft feel the need to dumb down and remove functionality when they built their newest OS?

  4. Joe Rhoney said on July 16, 2012 at 7:30 pm
    Reply

    Thank you so much! You even used the path to the exact program I wanted to use for text documents in your example, and it worked on the first try. I love when someone takes the time to post a helpful technical tip like this, even though there probably aren’t very many people who will take advantage of it. Thanks again!

  5. Frank Martin said on August 4, 2012 at 9:03 pm
    Reply

    Thanks, Awesome Job Mate!

  6. Elben said on August 3, 2014 at 12:10 pm
    Reply

    Thanks. It worked.

  7. Joris said on March 19, 2015 at 1:09 pm
    Reply

    Thanks a bunch! You don’t mention it specifically in the article, but if the edit > command keys (folders) aren’t present, you can create them yourself. I just tried adding “the path” “%1” to the Default string and it works flawlessly!

  8. KiwiTek said on August 27, 2015 at 7:48 am
    Reply

    Isn’t it easier just to go into Control Panel\Programs\Default Programs\Set Associations and change it there?

  9. Anon said on August 27, 2015 at 10:47 am
    Reply

    Nope. Because you can’t change the edit function from there, only the default double click program.

  10. Tony said on September 9, 2015 at 8:04 pm
    Reply

    I just tried this on Windows 10. Not only do I not have SystemFilesAssociations in the location detailed above, if I search the whole registry I get no match. Why that is, I don’t know, because it is there – but in a different location. http://www.tekrevue.com/tip/windows-right-click-edit-photoshop-instead-of-ms-paint/ has the Windows 10 version of this solution.

    1. Martin Brinkmann said on September 9, 2015 at 8:14 pm
      Reply

      Tony, I have checked in Windows 10 Pro and I still got the Registry key. Are you sure you looked in the right location? It is after all those System.* listings.

    2. Martin Brinkmann said on September 9, 2015 at 8:24 pm
      Reply

      I checked the setting on two PCs and they both have that setting in the location mentioned in the article.

    3. David said on January 27, 2017 at 3:52 pm
      Reply

      These are the same solution. The HKEY_LOCAL_MACHINE\Software\Classes key is a shortcut to the HKEY_CLASSES_ROOT hive.

    4. travis said on July 14, 2018 at 2:16 pm
      Reply

      I find it easiest to go to the line below the menu bar, probably says “Computer”, replace with “HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations” and hit enter

  11. Tony said on September 10, 2015 at 1:53 am
    Reply

    Interesting. The TekReview location is different and matches my configuration – I definitely don’t have it in the HKEY_LOCAL_MACHINE location, and instinct tells me you won’t have it in HKEY_CLASSES_ROOT, tho’ I might be wrong. My machine is running the free upgrade to Win 10, 64 bit. I have 4 others running Win 10, but we’re in the middle of a house move and I haven’t got time to check at the moment. Perhaps it depends on what was upgraded from? (In my case, a clean install of Win 8 upgraded through 8.1.)

  12. Steve said on March 3, 2016 at 6:48 pm
    Reply

    I’m a Linux admin forced to do Windows stuff, and I’m sorry but this article, while very well written, is not very clear at exactly the point when clarity is needed. Specifically, I’m talking about where it says
    “The order is filetype > shell > edit > command. Not every filetype has that chain but the most common ones do.”
    What is “the order?” Do you mean to say
    Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\[FILETYPE]\shell\edit
    If so, it would be helpful to add a screenshot of THAT instead of the one you have of
    Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\
    It also does not seem to be true on my machine that most common filetypes have this key. In fact, none do. A few have keys like
    Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\[FILETYPE]\shellex\
    I would not be uncomfortable adding the keys if the article were more clear or if I could find the key on any other common filetype.

  13. Steve said on March 3, 2016 at 6:56 pm
    Reply

    My stupid Windows install is opening MS Word when I choose to edit HTML files!!!
    How does that even happen? Is MS seriously pushing Word as an html editor?
    I had hoped that installing Notepad++ would treat this dysfunction but it did not.

    1. James said on April 10, 2016 at 2:44 pm
      Reply

      The above method only changes the Open context (which happens to change the edit context for txt files.
      To change the Edit context for Htm & Html, do the below

      \HKEY_CLASSES_ROOT\htmlfile\shell\Edit\command – (default) REG_SZ “C:\program xyz” “%1”

  14. Andrew said on June 21, 2016 at 11:31 pm
    Reply

    I have the command registry under both \HKEY_CLASSES_ROOT and \HKEY_LOCAL_MACHINE. Changing the image\edit\command in either of them accomplished nothing, and even though I wrote back “%systemroot%\system32\mspaint.exe” “%1” under data, I know get an error when trying to open any kind of image file – png, jpg, bmp, you name it. The error I get is: Windows cannot access the specified device path or file. You may not have the appropiate permissions to acces the item. :/

  15. Anonymous said on February 8, 2017 at 6:52 pm
    Reply

    This is what I needed to “open” a png in photo viewer and edit it with gimp. I had to create the Shell\edit key, the Command key under that, and set the default value to “C:\Program Files\GIMP 2\bin\gimp-2.8.exe” “%1”

  16. David said on August 26, 2017 at 6:18 pm
    Reply

    There used to be a place where you could not only set default programs but also add to the right click feature and put Edit with another file association. I edit *.gif files with more than one program. The default creates animation frames and the other is my photo editor that I want associated with EDIT in the right click menu. I used to change this easily in XP. Why is Microsoft dumbing down their OS. It seems the newer the OS the slopper they are becoming. Is it time to install Linux again? I run Windows 7 Pro and will not upgrade any further to the more stupid OS’s. 2000 Pro had this option to change and add to the right click menu. Why not make what you all had better instead of worse? (sorry venting!)

  17. Requaero said on September 1, 2017 at 12:08 am
    Reply

    I did this, but now every time I right-click and “edit”, a Windows 10 popup asks me “How do you want to open this file?”, with the default option being “Keep using this app”, with Notepad++ being selected and requiring a press of the “ok” button. Is there any way to remove this, or did I do anytyhing wrong?

  18. piecevcake said on July 17, 2018 at 2:18 am
    Reply

    Can you explain how to do this please? (I can’t see any option to type anything – address bar would have been kinda handy…)

    “travis said on July 14, 2018 at 2:16 pm
    Reply

    I find it easiest to go to the line below the menu bar, probably says “Computer”, replace with “HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations” and hit enter”

  19. Piecevcake said on July 17, 2018 at 4:52 am
    Reply

    I set a separate edit command for .ico files: exported the image key, exported the .ico key, pasted the shell-edit-command folders from the exported image reg file to the exported .ico file using notepad, saved, imported. Then found the application in start, right click, properties, copied the shortcut to the command key in the registry editor, added “%1” (whatever that is), voila! It worked immediately without rebooting. (Couldn’t use the app to “Open” because you couldnt see the thumbnails in explorer.)

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.