中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net  论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

游客:  注册 | 登录 | 命令行 | 会员 | 搜索 | 上传 | 帮助 »
作者:
标题: IE6上添加批处理快捷按钮 上一主题 | 下一主题
bluewaterx
初级用户





积分 132
发帖 68
注册 2008-7-29
状态 离线
『楼 主』:  IE6上添加批处理快捷按钮

只在xp IE6上测试通过
@echo off & setlocal enabledelayedexpansion
title Write IE Tools Bar By Ax

::添加IE工具栏自定义按钮一 [内容自定义]
set strName1=天书奇谈
set strHttp1=http://t.mop.com/

set strName2=电视直播
set strHttp2=http://www.fzlm.com/




Set btnRoot=HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\
SET rootA=%btnRoot%{07B32911-9A17-42C9-B5F8-D10F76605DA5}
SET rootB=%btnRoot%{8515FC11-B332-447E-8056-1197551CFDB4}
md "%appData%\XP Tools" 2>nul

::在IE工具栏上创建按钮:按钮一
reg add "%rootA%" /f /t REG_SZ /v "ButtonText" /d "!strName1!" >nul 2>nul
reg add "%rootA%" /f /t REG_SZ /v "CLSID"  /d "{1FBA04EE-3024-11d2-8F1F-0000F87ABD16}" >nul 2>nul
reg add "%rootA%" /f /t REG_SZ /v "Default Visible" /t REG_SZ /d "yes" >nul 2>nul
reg add "%rootA%" /f /t REG_SZ /v "Exec"  /d "%appData%\XP Tools\BtnA.cmd" >nul 2>nul
reg add "%rootA%" /f /t REG_SZ /v "Icon" /d "shell32.dll,181" >nul 2>nul
reg add "%rootA%" /f /t REG_SZ /v "HotIcon" /d "shell32.dll,180" >nul 2>nul
::在IE工具栏上创建按钮:按钮二
reg add "%rootB%" /f /t REG_SZ /v "ButtonText" /d "!strName2!" >nul 2>nul
reg add "%rootB%" /f /t REG_SZ /v "CLSID" /d "{1FBA04EE-3024-11D2-8F1F-0000F87ABD16}" >nul 2>nul
reg add "%rootB%" /f /t REG_SZ /v "Default Visible" /d "Yes" >nul 2>nul
reg add "%rootB%" /f /t REG_SZ /v "Exec" /d "%appData%\XP Tools\BtnB.cmd" >nul 2>nul
reg add "%rootB%" /f /t REG_SZ /v "Icon" /d "shell32.dll,182" >nul 2>nul
reg add "%rootB%" /f /t REG_SZ /v "HotIcon" /d "shell32.dll,183" >nul 2>nul

::按钮一内容
set outputPath=c:\a.vbs
echo ^@echo off ^& setlocal enabledelayedexpansion >"%appData%\XP Tools\BtnA.cmd"
echo mode con cols=25 lines=5 ^& title Qzone^&color f0 >>"%appData%\XP Tools\BtnA.cmd"
echo echo Set WshShell= WScript.CreateObject^("WScript.Shell"^)^>c:\a.vbs >>"%appData%\XP Tools\BtnA.cmd"
echo echo WshShell.AppActivate "" ^>^>c:\a.vbs >>"%appData%\XP Tools\BtnA.cmd"
echo echo WScript.Sleep 100 ^>^>c:\a.vbs >>"%appData%\XP Tools\BtnA.cmd"
echo echo WshShell.SendKeys "{F4}" ^>^>c:\a.vbs >>"%appData%\XP Tools\BtnA.cmd"
echo echo WScript.Sleep 100 ^>^>c:\a.vbs >>"%appData%\XP Tools\BtnA.cmd"
echo echo WshShell.SendKeys "!strHttp1!" ^>^>c:\a.vbs >>"%appData%\XP Tools\BtnA.cmd"
echo echo WshShell.SendKeys "~" ^>^>c:\a.vbs >>"%appData%\XP Tools\BtnA.cmd"
echo start c:\a.vbs >>"%appData%\XP Tools\BtnA.cmd"
::按钮二内容
echo ^@echo off ^& setlocal enabledelayedexpansion >"%appData%\XP Tools\BtnB.cmd"
echo mode con cols=25 lines=5 ^& title Qzone^&color f0 >>"%appData%\XP Tools\BtnB.cmd"
echo echo Set WshShell= WScript.CreateObject^("WScript.Shell"^)^>c:\a.vbs >>"%appData%\XP Tools\BtnB.cmd"
echo echo WshShell.AppActivate "" ^>^>c:\a.vbs >>"%appData%\XP Tools\BtnB.cmd"
echo echo WScript.Sleep 100 ^>^>c:\a.vbs >>"%appData%\XP Tools\BtnB.cmd"
echo echo WshShell.SendKeys "{F4}" ^>^>c:\a.vbs >>"%appData%\XP Tools\BtnB.cmd"
echo echo WScript.Sleep 100 ^>^>c:\a.vbs >>"%appData%\XP Tools\BtnB.cmd"
echo echo WshShell.SendKeys "!strHttp2!" ^>^>c:\a.vbs >>"%appData%\XP Tools\BtnB.cmd"
echo echo WshShell.SendKeys "~" ^>^>c:\a.vbs >>"%appData%\XP Tools\BtnB.cmd"
echo start c:\a.vbs >>"%appData%\XP Tools\BtnB.cmd"

::激活按钮
echo Windows Registry Editor Version 5.00>>tmp.reg
echo [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Toolbar]>>tmp.reg
echo "{1E796980-9CC5-11D1-A83F-00C04FC99D61}"=hex:07,00,00,00,fe,03,00,00,7e,69,79,\>>tmp.reg
echo 1e,c5,9c,d1,11,a8,3f,00,c0,4f,c9,9d,61,20,01,00,00,04,00,00,00,ff,03,00,00,\>>tmp.reg
echo 7e,69,79,1e,c5,9c,d1,11,a8,3f,00,c0,4f,c9,9d,61,21,01,00,00,00,00,00,00,00,\>>tmp.reg
echo 04,00,00,7e,69,79,1e,c5,9c,d1,11,a8,3f,00,c0,4f,c9,9d,61,24,01,00,00,04,00,\>>tmp.reg
echo 00,00,01,04,00,00,7e,69,79,1e,c5,9c,d1,11,a8,3f,00,c0,4f,c9,9d,61,25,01,00,\>>tmp.reg
echo 00,04,00,00,00,02,04,00,00,7e,69,79,1e,c5,9c,d1,11,a8,3f,00,c0,4f,c9,9d,61,\>>tmp.reg
echo 22,01,00,00,04,00,00,00,ff,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,00,\>>tmp.reg
echo 00,00,00,00,00,00,00,00,00,00,00,05,04,00,00,7e,69,79,1e,c5,9c,d1,11,a8,3f,\>>tmp.reg
echo 00,c0,4f,c9,9d,61,23,01,00,00,04,00,00,00,07,04,00,00,7e,69,79,1e,c5,9c,d1,\>>tmp.reg
echo 11,a8,3f,00,c0,4f,c9,9d,61,26,01,00,00,04,00,00,00,08,04,00,00,7e,69,79,1e,\>>tmp.reg
echo c5,9c,d1,11,a8,3f,00,c0,4f,c9,9d,61,2e,01,00,00,04,00,00,00,ff,ff,ff,ff,00,\>>tmp.reg
echo 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,0d,04,\>>tmp.reg
echo 00,00,80,69,79,1e,c5,9c,d1,11,a8,3f,00,c0,4f,c9,9d,61,73,01,00,00,00,00,00,\>>tmp.reg
echo 00,51,04,00,00,80,69,79,1e,c5,9c,d1,11,a8,3f,00,c0,4f,c9,9d,61,03,20,00,00,\>>tmp.reg
echo 04,00,00,00,52,04,00,00,80,69,79,1e,c5,9c,d1,11,a8,3f,00,c0,4f,c9,9d,61,04,\>>tmp.reg
echo 20,00,00,04,00,00,00>>tmp.reg
regedit /s tmp.reg >nul 2>nul
del /q tmp.reg >nul 2>nul
start iexplore


2009-10-22 00:07
查看资料  发短消息 网志   编辑帖子  回复  引用回复
mwm5
初级用户





积分 40
发帖 23
注册 2009-10-15
状态 离线
『第 2 楼』:  

学习了~~谢谢分享~~

2009-10-22 14:11
查看资料  发短消息 网志   编辑帖子  回复  引用回复
image72
新手上路





积分 6
发帖 6
注册 2008-12-16
状态 离线
『第 3 楼』:  

学习,
那按钮的图片怎么弄?

2009-10-25 22:05
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复
bluewaterx
初级用户





积分 132
发帖 68
注册 2008-7-29
状态 离线
『第 4 楼』:  

use 'IconsExtact_cn.exe(图标提取器)' open shell32.dll,then u see the pic.

[ Last edited by bluewaterx on 2009-10-26 at 00:39 ]

2009-10-26 00:38
查看资料  发短消息 网志   编辑帖子  回复  引用回复
zhxy9804
中级用户





积分 208
发帖 97
注册 2006-12-28
状态 离线
『第 5 楼』:  

这个只能当成模板来用,其实就是注册表转批处理。

2009-10-28 20:26
查看资料  发短消息 网志   编辑帖子  回复  引用回复

请注意:您目前尚未注册或登录,请您注册登录以使用论坛的各项功能,例如发表和回复帖子等。


可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题



论坛跳转: