3

Are there any good resources on programming this for a user account in Windows 8? I would like to use an exe, say 'png2eps.exe' within my system path, and allow for a right-click context to convert a png to an eps file trivially.

The argument is of course the file I'm right clicking on. Kind of like how one can convert a postscript file to pdf using Acrobat Distiller.

1 Answer 1

3

That is simple!

Copy your png2eps.exe to system folder(e.g. c:\Windows\ or c:\windows\system32).

After that, create txt file and put in it:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.png\shell\png2eps]
@="Convert PNG to EPS now!"

[HKEY_CLASSES_ROOT\.png\shell\png2eps\command]
@="png2eps CMD \"%1\""

Where: CMD - cmd switches and options for png2esp. \"%1\" - input file name from shell.

save txt, and change it extension to reg(e.g. before: file.txt after: file.reg). 2click on reg file and import to registry.

Menu item "Convert PNG to EPS now!" you will be see in context menu only if you call it for selected png file(s).

Sign up to request clarification or add additional context in comments.

5 Comments

Thanks! That seems simple enough, the registry is really the only way to do these things btw?
without programming skills - yes. Also you can install FileMenuTools utility and make the same with it, but your menu item will be only visible under FileMenuTools item.
@KevinLee It's the appropriate way to add simple user-defined context menu entries to the Explorer. You can make these entries user-specific, too, by changing HKEY_CLASSES_ROOT to HKEY_CURRENT_USER\Software\Classes (if you don't have admin privileges, but want to add a context menu item for your user).
@Alexandr For security reasons the executable should be defined with its full path and extension, otherwise a png2eps.com or png2eps.cmd someone dropped in the current directory may be used instead.
How do I remove the extension from %1? I tried using forms of %~n1 but had no luck...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.