Solved

Disable jpg files in internet explorer

Posted on 2011-09-11
21
1,132 Views
Last Modified: 2012-05-12
Hi,

I have Windows Xp Sp3 and Internet Explorer 8.

I would like to disable opening any jpg file in internet explorer. I am aware about going to
Tools>Internet Options>Advanced and disabling "show pictures" from there, but that alone is not solving my problem.

The problem is as follows:

I have a typical jpg file on my desktop. If i drag it into Internet Explorer, it opens up. So this is what i want to avoid.

Please let me know how i can go about doing this.

Thank you.
0
Comment
Question by:user_01
  • 13
  • 3
  • 2
  • +2
21 Comments
 

Author Comment

by:user_01
ID: 36519269
Have updated the points to 500
0
 
LVL 50

Expert Comment

by:jcimarron
ID: 36519403
user_01--It is not clear to me what you want to do.  Not allow .jpg files to open in IE, but allow them to open using other programs, or not allow .jpg to open at all.
In what program do .jpg files now open if you just click on the .jpg file (not drag and drop)?
0
 

Author Comment

by:user_01
ID: 36519456
I do not wish to allow .jpg files to open in IE, but allow them to open using other programs.

The default program used to open jpg files is "Windows picture and fax viewer"

By the way, i too am working on the link given below, to try and find the answer but it seems to be complicated:
http://msdn.microsoft.com/en-us/library/dd565661(v=VS.85).aspx
0
 

Author Comment

by:user_01
ID: 36519483
To elaborate further:

My ultimate aim here, is to disable images from opening in internet explorer.
If i remove the tick from "Show Pictures from the Advanced Tab, it does not show any pictures while browsing, but if i visit google (images section) and then click on any image and then click on the "full size image" link, it loads the jpg file directly and shows the image. This is what i wish to disable.

After i succeed with jpg files i will apply the same procedure to other image extensions as well.
0
 
LVL 82

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 100 total points
ID: 36519549
It appears that when you untick "Show Pictures", it only disables showing them in web pages.  When you click on the "full size image" link, there is no web page, just the image.  I don't see any way to block images when they are directly loaded instead of being in web pages.  I don't see anything in File Assocations that would help either.
0
 

Author Comment

by:user_01
ID: 36519593
I appreciate what you are saying but i need to make sure that there is no way out of this, since this is a very important thing for me to solve.

Maybe some registry entries need to be added to enable the restriction and/or modified for the same to take effect. In-fact it seems to be something to do with MIME handling.
0
 
LVL 50

Expert Comment

by:jcimarron
ID: 36519639
user_01--"then click on any image and then click on the "full size image" link, it loads the jpg file directly and shows the image. "
Yes, but is the .jpg opening in IE when you do that?  I would think it would open in the default program--Windows picture and fax viewer.
If the image opens in IE, then IE must be the default program and that can be changed in Control Panel.
0
 

Author Comment

by:user_01
ID: 36519669
Since i am opening the jpg file from IE when i click on the "full size image" link, it opens in IE itself, even though the default program to open jpg files in the win and fax viewer.  If i directly click on the jpg, it will use the default program specified in control panel.
But even if it opened with "win and fax viewer", this does not imply that it would in any way, be disabled in IE....

I have also noticed a strange thing whereby, if there is a jpg file, say "123.jpg", then even if i rename it to 123.abc, the jpg image still opens in IE. This is also the case if i remove the extension altogether.

I am still trying to make certain if we have not left out anything important somewhere.
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 36519754
Somewhere in Windows XP or IE is a setting to open files based on content and not extension.  I remember checking it but I don't remember where to find it.  

On my windows XP SP3 computer in File Types, the 'open' command is actually "rundll32.exe C:\WINXPRO\system32\shimgvw.dll,ImageView_Fullscreen %1" which does bring up Windows Picture and Fax viewer.

What I think you are seeing is that IE invokes that 'program' to display a JPG in it's window the same as it would other programs like Excel or Adobe Reader.  But it doesn't work if I am using LibreOffice to open Excel files.  I am thinking that like Firefox, IE has a list somewhere of 'helper' programs that you might be able to edit.  It's probably in the registry if it exists.
0
 
LVL 38

Assisted Solution

by:BillDL
BillDL earned 50 total points
ID: 36519857
While Internet Explorer is set as the default browser, when you click on a hyperlink in a web page, the command executed is (not shown exactly, but sufficient for the explanation):
iexplore.exe -nohome %1
where %1 is the HTTP "Target".

If that target file is a JPG image, then it will open in Internet Explorer.  It is the default behaviour, and if you start messing with the URL file association you will screw up other functionality.  In many cases the actual instruction to open the target file isn't a standard hyperlink in a web page, but is from a JavaScript file or some other scripted method, and it becomes even harder to think how you would specifically be able to block Hyperlinks to JPG files while still allowing images to show in web pages.

You can try this and see if it forces your "Full Size Image" to open in the external image viewer:

Start Menu > Settings > Control Panel > Folder Options > File Types.
Scroll down and find the JPG file type and select it.
Click the "Advanced" button.
Tick the "Confirm Open After Download" box.
Click the "OK" button and close the dalog.
Click the "Apply" button in Folder options if it is enabled, and close Folder Options.
Open and Close Internet Explorer in case it needs to load settings.
Open Internet Explorer to a Google Image search and see what happens.

I don't think that's going to help much, but let us know if anything changes after doing this.

I have tried to add a new action to the "URL:Hypertext Transfer Protocol" file type to allow Right-Clicking on a Hyperlink and opening in an external image editor, but it doesn't work with a standard program, and I don't think it is possible to set a new action to the command for the Windows Picture and Fax Viewer.

I will look later at how IE8's "accelerators" work, but I don't think it is possible to do what you want.
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

Author Comment

by:user_01
ID: 36519869
The setting "open files based on content and not extension" is located at:
Tools>Internet Options>Security - click "Custom level" - (it is at the lower end of the list). I tried switching the option and loading the jpg file, but it worked in both cases, so this option is out.

On my pc, there are only two programs which can open 123.abc (which is a jpg file). The programs are:
1. Windows Picture and Fax Viewer (wpfv)
2. Internet Explorer

The (wpfv) uses rundll32.exe to open, so i denied the security permissions for that file, after which, i renamed 123.abc to 123.jpg and tried to open it directly in the default program, which is (wpfv) but it failed. But after this, i straight away dragged it into internet explorer and it opeded immidiately.
So IE does not seem to rely on (WPFV).  

Believe me, i have spent two days trying to find the extensions which you are talking about, and let me tell you that i found various dirrerent types of extensions at various different places in the registry (same extensions but used for different functions at different places in the registry) and nothing has yet worked.
I have deleted chunks of extensions, relating to MIME types, all Internet explorer extensions, and others important parameters too wherever possible, but its just continuing to work whatever i do.
I then of course again reinstalled IE8 for other things to work properly.

I will be disabling the "Save as" function in IE, after which i will work on the Zone Alarm Pro firewall, where i will try to control the entry of jpg's using MIME... or something.
0
 

Author Comment

by:user_01
ID: 36519890
Tried the instructions given below, as you have mentioned, but it still worked.

Start Menu > Settings > Control Panel > Folder Options > File Types.
Scroll down and find the JPG file type and select it.
Click the "Advanced" button.
Tick the "Confirm Open After Download" box.
Click the "OK" button and close the dalog.
Click the "Apply" button in Folder options if it is enabled, and close Folder Options.
Open and Close Internet Explorer in case it needs to load settings.
Open Internet Explorer to a Google Image search and see what happens.

0
 
LVL 50

Assisted Solution

by:jcimarron
jcimarron earned 175 total points
ID: 36519902
user_01--You have not told us WHY you do not want .jpg files to open in IE.  Maybe that is none of my business, but is the reason is that you cannot manipulate the image as you can in WPFV.?
If that is the case you can right click on the .jpg image after first opening in IE and click Save Picture.  The Saved Picture should be . jpg, if it was originally, and will then open in WPFV when you click on it.
Please ignore if you do not want to disclose your reason.  As far as I can see, the way to stop .jpg opening in IE is to stop doing the two procedures where it happens.  
0
 

Author Comment

by:user_01
ID: 36519933
I downloaded Net Nanny to block offensive sites from the net but there are loopholes in it.

I would therefore like to block images altogether from a web browser.  

0
 
LVL 21

Accepted Solution

by:
Papertrip earned 175 total points
ID: 36519950
Here is an addon for Firefox that may do what you want.

Here is a list of text-only browsers.
0
 

Author Comment

by:user_01
ID: 36519985
Ok, will go through it but the minimum requirement is that the user should not be able to change the settings back, without the Admin password.
Moreover websites like Hotmail.com, Gmail need to work.
0
 

Author Closing Comment

by:user_01
ID: 36520138
I tried with Firefox and the job got done but since the solution is not workable for me, i have distributed the points accordingly.
0
 
LVL 38

Expert Comment

by:BillDL
ID: 36521378
Thank you user_01.

I have been close to asking exactly the same question as jcimarron asked in his comment ID: 36519902.

What worries me is where you have stated:

"... let me tell you that I found various different types of extensions at various different places in the registry ... and nothing has yet worked.  I have deleted chunks of extensions, relating to MIME types, all Internet explorer extensions, and others important parameters too wherever possible, but its just continuing to work whatever I do."

Frankly it is quite remarkable that Windows is still functioning, let alone Internet Explorer.  I'm not sure what you are referring to as "chunks of extensions" (I can only assume that you are doing this to your Registry in Regedit or using a File Association utility program), but it's really not a wise thing to go deleting file associations in the registry unless you know exactly what you are doing OR are prepared for the probability that at some point during your tinkering things will break totally and you will be forced to reinstall Windows.

That's your business at the end of the day though.

It is apparent that you (and I'm not trying to be insulting here) aren't altogether conversant with certain areas that you are trying to mess with.  Actually, "break" is probably a more appropriate expression, because that's what you are really trying to do - break functionality that has been a feature of Internet Explorer for many years.

You said:
"The (Windows Picture and Fax Viewer) uses rundll32.exe to open, so I denied the security permissions for that file."

RunDLL32.exe does exactly what the file name implies.  It "Runs" a "DLL", and it is used widely for a great many standard Windows functions.  You see, a DLL file contains a lot of different internal resources, including icons, cursors, images, dialogs, menus, text strings, and more.  When you open your Control Panel and double-click on an icon there RunDLL32.exe calls the "Control_RunDLL" function inside Shell32.dll and tells it to open the relevant Control Panel Applet (*.CPL file).  If you start setting permissions for RunDLL32.exe, things are likely to start breaking.

After investigating the results of changing file extensions and seeing what programs could still open a JPG file with a wrong extension, you concluded that:
"So IE does not seem to rely on Windows Picture and Fax Viewer."

No, they are not related.  The presence of Internet Explorer is what allows things like the Windows Help and Support to run, it is integrated with a lot of what you see on your Desktop, Taskbar, Start Menu, etc.  The Windows Picture and Fax Viewer is also well integrated with Windows Explorer, for example when you customise a folder of images to display them as a "slideshow" type layout, you are actually seeing the WPFV.  It is no surprise therefore that the WPFV resources are in the file "shimgvw.dll", which is an abbreviation for "Shell Image Viewer".  Although IE and WPFV are both well integrated into the Windows "shell", they do not rely on each other.

To try and prevent Internet Explorer from being able to display an image dragged into its window, you would also have to break quite a lot of fundamental functionality, such as "Drag and Drop Handlers", Object Linking and Embedding, the File > Open menu in Internet Explorer which allows you to browse to and open supported file types, the Address Bar which allows you to type in directory paths, and a whole lot more.

You have also said:
"I will be disabling the "Save As" function in IE, after which i will work on the Zone Alarm Pro firewall, where I will try to control the entry of jpg's using MIME... or something."

Please try and understand my reason for being so brusque with my comment here, but you are really fumbling around in the dark now in desperation to solve an issue that I'm sure most (if not all) of us don't really see as a "problem" woth breaking Windows to achieve.

I can understand the desire to have an option to open an image in an external application from a link in a web page as an alternative to having it open in IE, because I would actually like to have that functionality myself and intend to see if it is possible.  I can also see that there are a lot of occasions where you might prefer to be able to browse web pages as text only without all the image or other fancy content, but your most recent follow-ups sound like you are trying to turn Windows XP into a much earlier and more basic version of Windows.

Anyway, I hope you eventually do find a happy compromise somewhere down the line.

Out of curiosity I will continue looking for a way to force hyperlinks to JPG images to open externally, and I will certainly return and post back here if I do find a way.
0
 

Author Comment

by:user_01
ID: 36524284
Sorry, forgot to mention that before deleting the registry entries, i exported the keys and then later exported them back. So there is not problem here. Moreover i even reinstalled IE.

I tried the firewall route but that did not work too.

It seems to me now that this is very complex, i.e., so i am now leaving it here.
Will surely succeed in finding a compromise.

Will be away, so will not be able to respond in future.

Thanks a lot for your time and help. Much appreciated.

0
 

Author Comment

by:user_01
ID: 36533861

http://forums.majorgeeks.com/showthread.php?t=30885

Removed the appropriate reg entries. The problem looks to be solved after downgrading to IE 6.

Now, when i drag a jpg image in IE, it opens in WPFV.
0
 

Author Comment

by:user_01
ID: 36580628
Have found a better solution whereby i only need to add the word "jpg" to the blocked words list in Net Nanny (NN).
After this is done, and the "Show images" option in IE is disabled, the problem is solved.
Disabling the "Save As" option in IE etc.,  can be done through the registry for the limited user account.

After the "jpg image extension" was blocked, i noticed that various sites stopped working, even though the word jpg does not directly appear in the url anywhere.
For this, a proxy server can be used to bypass the blocked sites. This way you can see everything but still cannot see the jpg files.

Moreover i noticed that if proxy servers like www.gravelcity.com are used, the offensive websites remain blocked, i.e., if NN has been installed on the PC.
So now the user cannot visit offensive sites altogether, leave alone viewing any images and moreover view all un-offensive websites which may have been unintentionally blocked by NN.

I have now upgraded to IE 8 and everything is working fine.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Bada platform is becoming more and more famous this days and people talking about same. Some friends included those who have bada OS mobile asked me "what is bada?"and "what its features?". That encouraged me to research and write this article. [st…
Internet is a big network which is formed by connecting multiple small networks.It is a platform for all the users which are connected to it.Internet act as platform in different fields. Such as: Internet  as a collaboration platform. Internet  as…
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now