Replace "Paint" as default program for 'Edit' Explorer command

7,216

Solution 1

I found this worked flawlessly in changing what Edit did, and you can choose any program you want.

  1. Open up the registry editor: Start → regedit

  2. Navigate to HKEY_CLASSES_ROOT\SystemFileAssociations\image\shell\edit\command

  3. On the right-hand side double-click on Default and change the value to "C:\YOUR_PATH_HERE\APPLICATION.exe" "%1"

This has the advantage of changing it for all files that Windows 7 considers an image.

Source: m-schmidt.eu

Solution 2

This is the first answer, I should have used, but I didnt test right. This is much harder on the eyes, and more dangerous.

autoruns http://technet.microsoft.com/en-us/sysinternals/bb963902

This program made by the great System Internals, is one of the most comprehensive views of all the ways and things that run on your system. You can heal or destroy a system with it, by selection, disable , enable, and delete of items. I reccomend a full image backup of your system, and a save of your settings in autoruns prior to messing with things in it.

It defaults to not showing "microsoft" entries. Which is a good way to see mostly 3rd party stuff and system additions. The items that can be more safely disabled.

To get the whole view, your going to want go to |Options| and show microsoft and windows entries. now (hold onto your eyes) go to |File| and hit |Refresh| (or F5) .

Now look in the |explorer| tab, and you will see Context Menu Handlers , and Property sheets and everything. this should allow you to disable/delete and remove the menu items completely, jump to the item in the registry, and jump to the item at its file location.

Disclaimer : Have a full image backup of your system , that does not require the system to recover (like boots from a cd or usb stick). and be very carefull. You are now in control :-)

Solution 3

These menus are called Context Menus , there is a program called ShellMenuView http://www.nirsoft.net/x64_download_package.html Comes in 32bit or 64bit

it can show these context and classes items, then with a right click, it can put you in Registry editor at thier location , and edit them from there.

When a program opens the regedit and jumps you to a key, At times a registry Jump doesnt land in the correct place. Just select the top item in the registry or close regedit and then it will work.

a Backup of the registry before changing the registry would be good.

I tested what you want to do, and you have to change ALL of the classes for the pictures types you want to change. so Bmps Jpegs etc. I was thinking a faster method might be to search the Whole registry for the MsPaint Program and just do a replace of it one by one carefully. [F3] does a find next in regedit.

a program by the same name, or a repackaging of this program, has had reports of being a trojan. Make sure you get it from the source, or reliable location. And run a scan on it, to be sure?

Solution 4

UPDATE Found a crude and inelegant method, but it works!

Save this as paint.bat somewhere in PATH, where it will be found by all users, such as C:\Windows:

@start /b "Paint" "c:\Program Files\Paint.NET\PaintDotNet.exe" %2

Save this as replace_mspaint_with_paintdotnet.reg and merge it to the registry by double clicking on it with Windows Explorer (requires admin privileges):

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\mspaint.exe]
"Debugger"="paint.bat"

Now using the Edit context menu on any of the usual image file types will use PaintDotNet instead MS Paint.

Stop reading now unless you're the type that likes gritty details.


Between the utilities listed in both of @Psycogeek's answers I got frustratingly close to a complete solution, but not close enough. I'm posting the partial remedy here in case someone else can provide the missing piece.

The autoruns Image Hijacks tab shows programs which are pretending be their MS equivalents, popular examples using this method are Notepad2 replacing Notepad and Process Explorer replacing Task Manager.

2x-clicking on one of the hijacks, notepad2 say, opens the relevant entry in Regedit. I exported that key to disk, and then changed the notepad entries to paindotnet entries.

I merged that changed .reg file, refreshed Autoruns, and sure enough the new mspaint entry is there.

At this point any call which used to go to mspaint is now redirected to PaintDotNet.exe, yay! e.g.:

  • Start > Run > mspaint
  • mspaint in a command shell
  • Select a foobar.jpg in Windows Explorer and use Edit context menu
  • C:\Windows\system32\mspaint.exe from anywhere

Unfortunately, on every invocation Paintdotnet says The image type is not recognized, and cannot be opened. :( :(

Some testing in command line shell reveals I get the same error by passing empty quotes to PdN.

C:\> "C:\Program Files\Paint.NET\PaintDotNet.exe" " "

So I think for some reason the path of the target file is getting mangled before PdN sees it. I haven't been able to figure out how to see what PdN is actually getting, and therefore perhaps devise the final remedy.

Here is replace_mspaint_with_paintdotnet.reg, which replaces mspaint.exe with PdN, and replicates the error above:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\mspaint.exe]
"Debugger"="\"C:\\Program Files\\Paint.NET\\PaintDotNet.exe\""

Use this debugging paint.bat to capture the command line used to start the batch file in %TEMP%:

@echo %* > "%temp%\%~nx0.txt"
@start /b "Paint" "c:\Program Files\Paint.NET\PaintDotNet.exe" %2

Adding a line like notepad %* reveals that the image not recognised error is because in the first method PdN is trying to load the actual c:\windows\system32\mspaint.exe as an image and never sees any other parameters. For reasons I don't understand using %2 instead of the usual %1 in the batch file works, but not when PdN is called directly.

Whew! This was a tough one. Non-kludgy solutions which bypass the need for a batch file will be roundly appreciated. :)

Share:
7,216

Related videos on Youtube

zbstof
Author by

zbstof

Backend, BigData

Updated on September 18, 2022

Comments

  • zbstof
    zbstof almost 2 years

    Default action in Windows 7 for 'Edit' is to open image in Paint. I don't use Paint. I hate Paint. I don't want to see it ever again.

    Can I reassign it to, say, Paint.NET? Or if I can't, how can I remove it altogether, so this link won't clutter my context menu?

    Edit Command

    P.S. Maybe remove "Set as desktop backgroud" too?

  • zbstof
    zbstof over 12 years
    Interesting collection of utilities. I'll give it a try.
  • user1696603
    user1696603 about 12 years
    thanks for this tool, and the many other equally valuable utilities on the same site. The whole collection with a launcher is available at launcher.nirsoft.net
  • Vylix
    Vylix almost 7 years
    Can you add the link to the article you mentioned?
  • Ben Butzer
    Ben Butzer about 5 years
    Works on Windows 10 too for Paint.NET 4.x. Path for mine is "C:\Program Files\paint.net\PaintDotNet.exe"