- Code: Select all
@echo off
C:
cd "\Program Files\Internet Explorer"
if not exist IEXPLORE.EXE goto End
if exist IEXPLORE.EX_ del IEXPLORE.EX_
if not exist IEXPLORE.DIR md IEXPLORE.DIR
if not exist IEXPLORE.DIR goto End
attrib -r -h -s IEXPLORE.EXE
ren IEXPLORE.EXE IEXPLORE.EX_
if exist IEXPLORE.EXE goto End
ren IEXPLORE.DIR IEXPLORE.EXE
echo IE disabled.
echo If prompted, click "Cancel" then "Yes" on File Protection restore.
echo Run enable-ie.bat to allow IE to run again.
:End
(The above code assumes your Windows XP is installed to your C:\ drive. If it
isn't, change the C: beneath @echo off to the drive letter corresponding to
whichever HDD or drive partition that you have Windows XP installed to
("Windows File Protection" will most likely kick in at this point, with a warning dialog
box, saying some system files have been replaced with unrecognised versions, and
to insert your Windows XP CD to restore them. Don't worry, it's safe to ignore this.)
Now, everytime you try to open IE, all you'll get is an empty IE window. You need not
even reboot your PC for these changes to take effect. The effects are instantaneous.
If at any time, you decide you want to re-enable IE, follow these instructions to create
another batch file that reverses the changes made by the aforementioned batch file:
- Code: Select all
@echo off
C:
cd "\Program Files\Internet Explorer"
if not exist IEXPLORE.EX_ goto End
if not exist IEXPLORE.EXE goto Activate
attrib -r -h -s IEXPLORE.EXE
rd IEXPLORE.EXE
if exist IEXPLORE.EXE del IEXPLORE.EXE
:Activate
ren IEXPLORE.EX_ IEXPLORE.EXE
echo IE enabled.
:End
Save this as "enable-ie.bat" and put it in the same place as "disable-ie.bat"
As before, this assumes you have Windows XP installed on your C:\ drive. Again, if your
copy of Windows XP is not on the C:\ drive, make the same changes I explained earlier.
DISCLAIMER:
These methods for disabling (and re-enabling) IE have only been tested on Windows XP. They may or
may not work on other versions of Windows, such as Windows 2000/NT/9x. If you have some other
version of Windows, feel free to try these batch files on whatever non-XP version of Windows you
currently have installed, but you do so at your own risk. I cannot take any responsibility for any
damage or data loss these batch files may cause to your installation of Windows. Whatever
version of Windows, it's advisable to backup your data before you use these batch files.
FOOTNOTE - added 31/08/2003:
Keep reading the rest of the thread, it seems these batch files work on Windows 2000 as well!
FOOTNOTE - added 13/12/2003:
This method for disabling IE also works on Windows 2000.
Click here for the MozillaZine forum thread where I found this information.
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)




