'Adds theCyberAnswers to IE's Tools Menu and Toolbar
'© 2005 by Mobo - http://www.cyberanswers.org


Option Explicit
Dim Title, Response
Title = "Add CyberAnswers to the Toolbar"

Dim fso, ws, TgtIcon, RegKey
Set ws = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
TgtIcon = fso.GetSpecialFolder(0) & "\Web\ca.ico"

RegKey = "HKLM\SOFTWARE\Microsoft\Internet Explorer\Extensions\{aad080d5-9287-40ed-bdec-2cbed012baaa}\Icon"
RegKey = "HKLM\SOFTWARE\Microsoft\Internet Explorer\Extensions\{aad080d5-9287-40ed-bdec-2cbed012baaa}\HotIcon"

On Error Resume Next

ws.RegWrite TgtIcon
fso.CopyFile "ca.ico", TgtIcon, True

Dim WSHShell, p
Dim GUID

Set WSHShell = WScript.CreateObject("WScript.Shell")
GUID = "{aad080d5-9287-40ed-bdec-2cbed012baaa}"

p = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Extensions\"

  WshShell.RegWrite P & GUID & "\ButtonText","CyberAnswers"
  WshShell.RegWrite P & GUID & "\clsid","{1FBA04EE-3024-11d2-8F1F-0000F87ABD16}"
  WshShell.RegWrite P & GUID & "\Default Visible","YES"
  WshShell.RegWrite P & GUID & "\Exec", "http://www.cyberanswers.org/forum/index.php"  
  WshShell.RegWrite P & GUID & "\HotIcon",TgtIcon
  WshShell.RegWrite P & GUID & "\Icon", TgtIcon
  WshShell.RegWrite P & GUID & "\MenuText","CyberAnswers"

  Set WshShell = Nothing

  MsgBox "CyberAnswers has been added to Internet" & vbCR & " Explorer's Tools Menu and Toolbar",4096,"Finished!"


