Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On Windows XP, you could go to Folder Options - File Types, select PNG, create a new action, such as this

Action: Crush
Application: "F:\Programs\PNGCrush\crush.bat" "%1"

So you can right click on a .png file and select Crush.

How do you do this on Windows 7? I assume through regedit or .reg file, but how?

EDIT: Thank you for all your replies... but I'd like to avoid "Open With" or 3rd party program if possible.

share|improve this question
Asked Creating a .reg file for Windows 7 again? – Tom Wijsman Mar 26 '12 at 11:54
Hey again Tom! Now that I can run a .reg file (thanks to you), now I am asking how to write a .reg file that does the above (ie. the script). Fyi, the .reg file on my previous post doesn't work, I was just curious why I couldn't run it. – Aximili Mar 27 '12 at 3:39
up vote 2 down vote accepted

To add a new item to the Right-click context menu of .png files, you add a new key and command subkey to HKEY_CLASSES_ROOT\pngfile\shell\ in the Registry.

Based on your example, importing the following .reg file should work:

Windows Registry Editor Version 5.00


@="\"F:\\Programs\\PNGCrush\\crush.bat\" \"%1\""
share|improve this answer
This looks promising, thanks a lot! I successfully inserted it into the registry. But why can't still I see the "Crush" menu?? I could add a context menu to a folder the same way. I've restarted my computer. – Aximili Mar 27 '12 at 8:03
It should apply immediately, and should be visible when you right-click a PNG file. Alternatively, you can add these keys to HKEY_CLASSES_ROOT\*\shell. If you look at some of the keys in there, you should see the pattern. If I've made a mistake, let me know! :) – iglvzx Mar 27 '12 at 8:08
I got it! It's HKEY_CLASSES_ROOT\ACDSee Pro 5.png\shell. Why is the name so non-standard, did ACDSee change it? Anyway it works, thank you!! – Aximili Mar 27 '12 at 8:38

Try to click on png file with right mouse button, select Open With, then browse to your bat file. Do not forget to remove check "Use this program as default".

share|improve this answer

While it's possible through the registry, it can get complicated. I'd recommend FileTypesMan - it's pretty intuitive.

share|improve this answer

FileTypesMan will work, but it's a bit dated and isn't as robust as door2windows equivalent product, which I like best.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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