Skip navigation

JSI Tip 8972. How can I use a batch script to configure the Editor that Internet Explorer uses when I right-click and press <B>View Source</B>?

Using REG.EXE, built into Windows XP, Windows Server 2003, and later, or installed from the Windows 2000 Support Tools, I have scripted IEViewSource.bat to configure the Editor that Internet Explorer uses when you right-click a Web page and press View Source.

The syntax for using IEViewSource.bat is:

IEViewSource FQFN2Editor

Where FQFN2Editor is the fully qualified file name of the Editor you wish to use, like "C:\Program Files\Utilities\UltraEdit\Uedit32.exe" or "C:\Program Files\Microsoft Office\Office10\FRONTPG.EXE" or %SystemRoot%\Notepad.exe.

IEViewSource.bat contains:

@echo off
If \{%1\}==\{\} @echo Syntax: IEViewSource FQFN2Editor&goto :EOF
if not exist %1 @echo IEViewSource - %1 NOT found.&goto :EOF
@echo.
@echo reg add "HKLM\SOFTWARE\Microsoft\Internet Explorer\View Source Editor\Editor Name" /VE /D %1 /F
reg add "HKLM\SOFTWARE\Microsoft\Internet Explorer\View Source Editor\Editor Name" /VE /D %1 /F
@echo.



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish