Re: Changing IE's default image viewer



PA Bear
07-09-2005, 10:02 PM
Asked/Answered in IE5 newsgroup.

Eric wrote:
> Greetings:
>
> Trying to change the behavior of InternetExplorer IE when you click on
> a link that points directly to an image...
>
> For example:
>
> This link: http://whatever.com/image.jpg
>
> When you click on this, IE's default behavior is to open up the image
> in a browser window...
>
> We instead would like it to open up the image in say, microsoft picture
> editor for example or paint.exe, or paintshop, or whatever we specify.
>
> Do you know of a registry setting or other way to change this behavior
> ?
>
> best regards,
>
> ericswebber@yahoo.com

Eric
07-09-2005, 10:03 PM
I could not find it, could you please provide the link to the answer ?

kindest regards,

Eric

Jim Wood
07-09-2005, 10:03 PM
Eric,

I don't know what that's all about, it wouldn't open for me either.
However, I believe that your fundamental question is answered completely in
the post that's 4 down from yours, "How to prevent IE from opening JPGs?",
the original question by coxrail and a total of 10 posts. There's even an
MVP involved... check it out.

PA Bear
07-09-2005, 10:03 PM
IIRC that thread is discussing opening an image already saved to the HDD.
Eric's talking about an image on a webpage.
--
~Robear Dyer (PA Bear)
MS MVP-Windows (IE/OE) & Security

Jim Wood wrote:
> Eric,
>
> I don't know what that's all about, it wouldn't open for me either.
> However, I believe that your fundamental question is answered completely
> in the post that's 4 down from yours, "How to prevent IE from opening
> JPGs?", the original question by coxrail and a total of 10 posts.
> There's even an MVP involved... check it out.

Eric
07-09-2005, 10:03 PM
Not exactly, I am talking about a direct link to an image

i.e. http://whatever.com/image.jpg

as opposed to an img source tag on a page.

i.e. <img src=image.jpg>

This is a fine yet important distinction, since to open an image viewer
for each and every embedded image on a page would be tedious, and is in
fact not what we are after.

We only wish to open images with an image viewer of our choosing when a
browser goes to a direct link to an image, e.g.
http://whatever.com/image.jpg instead of rendering it with the browser
itself.

Another way to consider it is to consider the following:

Lets say you have a web page and on the page there is a link such as
this: http://whatever.com/image.jpg, when the user clicks on this
link, from within IE of course, instead of IE opening the image, an
image viewer of our choosing would.

Of course all embedded images, with img src tags would continue to be
rendered by IE.

Does this clarify it a bit ?

Thanks Again !!

best regards,

Eric

Jon Kennedy
07-09-2005, 10:03 PM
I think the only way to do what you want is going to be to add an entry in
IE's right lick context menu. Here is the registry key involved:
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt

What you want is a right click context menu item that when over a link to an
image file, it will bring up an "Open with" dialog box where you can then
invoke the image viewer of your choice.

Problem is, for security reasons, this can only be to an HTML page - you
can't run an executable, say such as
"C:\Windows\rundll32.exe shell32.dll,OpenAs_RunDLL %1", to bring up the
"Open with" dialog box for instance.

So, someone better than me at this (and I've been playing around at this for
hours now) will have to write a script on an HTML page that will bring up
the "Open with" dialog box.

Maybe someone in a scripting newsgroup here can do this:
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.scripting.jscript&lang=en&cr=US
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.scripting.vbscript&lang=en&cr=US

Examples of a programmer doing this:
http://www.pcmag.com/article2/0,1759,1176116,00.asp
http://blogs.msdn.com/oldnewthing/archive/2004/05/24/140283.aspx
http://www.jfitz.com/tips/search.htm - view source on this page to see the
script usage for this context menu
http://www.codestore.net/A55692/store.nsf/0/7FE96A40EC1955BD8625698A003ABBE5?OpenDocument

IE's context menu more info:
http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/overview/Overview.asp

Here's a program that will do something like this, but I think for only
Windows Explorer context menus:
http://www.baxbex.com/openexpert.html

--

Jon R. Kennedy, Microsoft MVP/IE
Charlotte, NC, USA
jkennedy2@carolina.rr.com

"Eric" <ericswebber@yahoo.com> wrote in message
news:1115901253.629980.187810@g14g2000cwa.googlegroups.com...
> Not exactly, I am talking about a direct link to an image
>
> i.e. http://whatever.com/image.jpg
>
> as opposed to an img source tag on a page.
>
> i.e. <img src=image.jpg>
>
> This is a fine yet important distinction, since to open an image viewer
> for each and every embedded image on a page would be tedious, and is in
> fact not what we are after.
>
> We only wish to open images with an image viewer of our choosing when a
> browser goes to a direct link to an image, e.g.
> http://whatever.com/image.jpg instead of rendering it with the browser
> itself.
>
> Another way to consider it is to consider the following:
>
> Lets say you have a web page and on the page there is a link such as
> this: http://whatever.com/image.jpg, when the user clicks on this
> link, from within IE of course, instead of IE opening the image, an
> image viewer of our choosing would.
>
> Of course all embedded images, with img src tags would continue to be
> rendered by IE.
>
> Does this clarify it a bit ?
>
> Thanks Again !!
>
> best regards,
>
> Eric
>


Re: Changing IE's default image viewer