首页 > 开发 > 综合 > 正文

一段在IE上加按钮的Script,主要操作注册表,先贴了再说

2020-02-03 13:37:30
字体:
来源:转载
供稿:网友


' addbuttonie.vbs
' adds a custom button to the ie50 toolbar
'

rc = msgbox("would you like to add a new button to the ie50 toolbar?",vbyesno)
if rc=vbno then wscript.quit

' the registry path where to add our new entries.
' if your registry doesn't contain a shell node, it'll be silently created
reg_hklm_ie50_base = "hklm/software/microsoft/internet explorer/extensions"

' adds a new key (needs a newly created guid)
reg_hklm_ie50_guid = reg_hklm_ie50_base & "/{10954c80-4f0f-11d3-b17c-00c0dfe39736}/"

' creates the required values
set shell = wscript.createobject("wscript.shell")
shell.regwrite reg_hklm_ie50_guid & "buttontext", _
               "我的记事本", _
               "reg_sz"
shell.regwrite reg_hklm_ie50_guid & "menutext", _
               "我的记事本", _
               "reg_sz"
shell.regwrite reg_hklm_ie50_guid & "menustatusbar", _
               "run script", _
               "reg_sz"
shell.regwrite reg_hklm_ie50_guid & "clsid", _
               "{1fba04ee-3024-11d2-8f1f-0000f87abd16}", _
               "reg_sz"
shell.regwrite reg_hklm_ie50_guid & "default visible", _
               "yes", _
               "reg_sz"
shell.regwrite reg_hklm_ie50_guid & "icon", _
               "d:/documents and settings/sgyuan/desktop/cutting1199/icon1.ico", _
               "reg_sz"
shell.regwrite reg_hklm_ie50_guid & "hoticon", _
               "d:/documents and settings/sgyuan/desktop/cutting1199/icon2.ico", _
               "reg_sz"
shell.regwrite reg_hklm_ie50_guid & "exec", _
               "notepad.exe", _
               "reg_sz"



发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表