To create a custom shell script in Internet Explorer's right click menu, create the script, place it in the c:\windows\web\ directory and register it in the system registry.

<html> <script language="JavaScript" defer> var parentwin = external.menuArguments var doc = parentwin.document var sel = doc.selection var rng = sel.createRange() var str = new String(rng.text) // highlight (yellow) selected string on parent window: rng.execCommand("BackColor",0,"YELLOW") </script> </html>      Create a REG file to register the script into the system registry. The location in registry is: "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt"

REGEDIT4 [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt] [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\&SPC Links] @="file://c:/windows/web/spclinks.htm" "contexts"=hex:10      In the above example, "SPC Links" is the name that will represent the script in the right click menu. The ampersand (&) just before the "S" designates the S as the underlined (shortcut key) value for keyboard usage. The ampersand may be placed anywhere in the string. For example: it could have been "Spc Lin&ks" to designate the 'k' as the hotkey value.

Context Values
EntryDescription
Default0x01
Image0x02
ActiveX Control0x04
Table0x08
Selected Text0x10
Hyperlink0x20


Specialized Shell Scripts: