Dim Confirm, fso, currdir, Winfldr, Webfldr, ws, RegKey, App, htmfile
Confirm = MsgBox ("WebShots 1999x1333 Loader"&vbCRLF&"MS IE Context Menu Option"&vbCRLF&"(c) Dubnium@mail.ru, 2005"&vbCRLF&"Do you want to install?",68,"Installation")
If Confirm = 6 Then
Set fso = CreateObject("Scripting.FileSystemObject") 
CurrDir = fso.GetAbsolutePathName(".")
Set htmfile=fso.CreateTextFile(CurrDir&"\WebShotsLoader.htm")
htmfile.write "<SCRIPT LANGUAGE=JavaScript defer>"&vbCRLF
htmfile.write "var x=external.menuArguments.event.srcElement;var a=x.alt;var y=x.src;var l=y.length;"&vbCRLF
htmfile.write "var n=y.substring(l-22,l-17);var p=y.substring(l-19,l-18);var s=y.substring(l-18,l-17);"&vbCRLF
htmfile.write "var f=a.indexOf('\""');var l=a.lastIndexOf('\""');var m=a.substring(l,f+1);if(p != 0) d=p+s; else d=s;"&vbCRLF
htmfile.write "w=open('http://webshots.com/s/cache1/ProInternalUse/'+d+'/'+n+'_poster2000.jpg'); var nm=n+'_'+m;"&vbCRLF
htmfile.write "w.clipboardData.setData('Text', nm);w.alert('Picture name:\n'+nm+'\ncopied to the clipboard. You can past it now.');"&vbCRLF
htmfile.write "</SCRIPT>"
Set ws = CreateObject("WScript.Shell")
RegKey = "HKCU\Software\Microsoft\Internet Explorer\MenuExt\Load WebShots 1999x1333"
App = CurrDir&"\WebShotsLoader.htm"
On Error Resume Next
ws.RegWrite RegKey & "\", App
ws.RegWrite RegKey & "\contexts",&H2,"REG_DWORD"
MsgBox "WebShots Loader was succesfully installed!"&vbCRLF&"User Guide:"&vbCRLF&"1. Open webshots.com in new IE-browser"&vbCRLF&"2. Right-click on any preview image to open context menu"&vbCRLF&"3. Select 'Load Webshots 1999x1333' option"&vbCRLF&"4. Enjoy!",0,"Confirmation of Installation"
End If
Set f = Nothing
Set fso = Nothing
Set ws = Nothing