将下面的内容保存成.vbs文件,然后双击执行,在打开ie页面,在页面中点击右键,看看菜单中多了个什么!!:)
复制代码 代码如下:
option explicit
dim hkey_root,hkey_path,hkey_key,filepath
dim fs,fso,regwsh
hkey_root="hkey_current_user"
hkey_path="\software\microsoft\internet explorer"
//先创建文件
set fs=wscript.createobject("scripting.filesystemobject")
filepath="c:\pagesetup_default.htm"
set fso=fs.createtextfile(filepath,true)
fso.write("<script language=""vbscript"">"+vbcrlf _
+"dim hkey_root,hkey_path,hkey_key,filepath,regwsh" +vbcrlf _
+"hkey_root=""hkey_current_user""" +vbcrlf _
+"hkey_path=""\software\microsoft\internet explorer""" +vbcrlf _
+"filepath=""c:\pagesetup_null.htm""" +vbcrlf _
+"//设置网页打印的页眉页脚为默认值"+vbcrlf _
+"set regwsh = createobject(""wscript.shell"")" +vbcrlf _
+"hkey_key=""\pagesetup\header""" +vbcrlf _
+"regwsh.regwrite hkey_root+hkey_path+hkey_key,""&w&b页码:&p/&p""" +vbcrlf _
+"hkey_key=""\pagesetup\footer""" +vbcrlf _
+"regwsh.regwrite hkey_root+hkey_path+hkey_key,""&u&b&d""" +vbcrlf _
+"//设置右键菜单上的显示文字" +vbcrlf _
+"//首先删除原来的项,然后再设置新的项"+vbcrlf _
+"on error resume next" +vbcrlf _
+"hkey_key=hkey_root+hkey_path+""\menuext\打印时恢复页眉页脚\""" +vbcrlf _
+"regwsh.regdelete hkey_key" +vbcrlf _
+"hkey_key=hkey_root+hkey_path+""\menuext\打印时去掉页眉页脚\""" +vbcrlf _
+"regwsh.regwrite hkey_key,filepath" +vbcrlf _
+"//关闭regwsh" +vbcrlf _
+"set regwsh=nothing"+vbcrlf _
+"</script>")
fso.close
filepath="c:\pagesetup_null.htm"
set fso=fs.createtextfile(filepath,true)
fso.write("<script language=""vbscript"">" +vbcrlf _
+"dim hkey_root,hkey_path,hkey_key,filepath,regwsh" +vbcrlf _
+"hkey_root=""hkey_current_user""" +vbcrlf _
+"hkey_path=""\software\microsoft\internet explorer""" +vbcrlf _
+"filepath=""c:\pagesetup_default.htm""" +vbcrlf _
+"//设置网页打印的页眉页脚为空" +vbcrlf _
+"set regwsh =createobject(""wscript.shell"")" +vbcrlf _
+"hkey_key=""\pagesetup\header""" +vbcrlf _
+"regwsh.regwrite hkey_root+hkey_path+hkey_key,""""" +vbcrlf _
+"hkey_key=""\pagesetup\footer""" +vbcrlf _
+"regwsh.regwrite hkey_root+hkey_path+hkey_key,""""" +vbcrlf _
+"//设置右键菜单上的显示文字" +vbcrlf _
+"//首先删除原来的项,然后再设置新的项" +vbcrlf _
+"on error resume next"+vbcrlf _
+"hkey_key=hkey_root+hkey_path+""\menuext\打印时去掉页眉页脚\""" +vbcrlf _
+"regwsh.regdelete hkey_key"+vbcrlf _
+"hkey_key=hkey_root+hkey_path+""\menuext\打印时恢复页眉页脚\""" +vbcrlf _
+"regwsh.regwrite hkey_key,filepath" +vbcrlf _
+"//关闭regwsh" +vbcrlf _
+"set regwsh=nothing"+vbcrlf _
+"</script>")
fso.close
set regwsh=wscript.createobject("wscript.shell")
hkey_key=hkey_root+hkey_path+"\menuext\打印时去掉页眉页脚\"
regwsh.regwrite hkey_key,"c:\pagesetup_null.htm"
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!
复制代码 代码如下:
option explicit
dim hkey_root,hkey_path,hkey_key,filepath
dim fs,fso,regwsh
hkey_root="hkey_current_user"
hkey_path="\software\microsoft\internet explorer"
//先创建文件
set fs=wscript.createobject("scripting.filesystemobject")
filepath="c:\pagesetup_default.htm"
set fso=fs.createtextfile(filepath,true)
fso.write("<script language=""vbscript"">"+vbcrlf _
+"dim hkey_root,hkey_path,hkey_key,filepath,regwsh" +vbcrlf _
+"hkey_root=""hkey_current_user""" +vbcrlf _
+"hkey_path=""\software\microsoft\internet explorer""" +vbcrlf _
+"filepath=""c:\pagesetup_null.htm""" +vbcrlf _
+"//设置网页打印的页眉页脚为默认值"+vbcrlf _
+"set regwsh = createobject(""wscript.shell"")" +vbcrlf _
+"hkey_key=""\pagesetup\header""" +vbcrlf _
+"regwsh.regwrite hkey_root+hkey_path+hkey_key,""&w&b页码:&p/&p""" +vbcrlf _
+"hkey_key=""\pagesetup\footer""" +vbcrlf _
+"regwsh.regwrite hkey_root+hkey_path+hkey_key,""&u&b&d""" +vbcrlf _
+"//设置右键菜单上的显示文字" +vbcrlf _
+"//首先删除原来的项,然后再设置新的项"+vbcrlf _
+"on error resume next" +vbcrlf _
+"hkey_key=hkey_root+hkey_path+""\menuext\打印时恢复页眉页脚\""" +vbcrlf _
+"regwsh.regdelete hkey_key" +vbcrlf _
+"hkey_key=hkey_root+hkey_path+""\menuext\打印时去掉页眉页脚\""" +vbcrlf _
+"regwsh.regwrite hkey_key,filepath" +vbcrlf _
+"//关闭regwsh" +vbcrlf _
+"set regwsh=nothing"+vbcrlf _
+"</script>")
fso.close
filepath="c:\pagesetup_null.htm"
set fso=fs.createtextfile(filepath,true)
fso.write("<script language=""vbscript"">" +vbcrlf _
+"dim hkey_root,hkey_path,hkey_key,filepath,regwsh" +vbcrlf _
+"hkey_root=""hkey_current_user""" +vbcrlf _
+"hkey_path=""\software\microsoft\internet explorer""" +vbcrlf _
+"filepath=""c:\pagesetup_default.htm""" +vbcrlf _
+"//设置网页打印的页眉页脚为空" +vbcrlf _
+"set regwsh =createobject(""wscript.shell"")" +vbcrlf _
+"hkey_key=""\pagesetup\header""" +vbcrlf _
+"regwsh.regwrite hkey_root+hkey_path+hkey_key,""""" +vbcrlf _
+"hkey_key=""\pagesetup\footer""" +vbcrlf _
+"regwsh.regwrite hkey_root+hkey_path+hkey_key,""""" +vbcrlf _
+"//设置右键菜单上的显示文字" +vbcrlf _
+"//首先删除原来的项,然后再设置新的项" +vbcrlf _
+"on error resume next"+vbcrlf _
+"hkey_key=hkey_root+hkey_path+""\menuext\打印时去掉页眉页脚\""" +vbcrlf _
+"regwsh.regdelete hkey_key"+vbcrlf _
+"hkey_key=hkey_root+hkey_path+""\menuext\打印时恢复页眉页脚\""" +vbcrlf _
+"regwsh.regwrite hkey_key,filepath" +vbcrlf _
+"//关闭regwsh" +vbcrlf _
+"set regwsh=nothing"+vbcrlf _
+"</script>")
fso.close
set regwsh=wscript.createobject("wscript.shell")
hkey_key=hkey_root+hkey_path+"\menuext\打印时去掉页眉页脚\"
regwsh.regwrite hkey_key,"c:\pagesetup_null.htm"
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!
标签:
IE,页眉,页脚
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
暂无“利用vbs脚本实现设置IE的打印页眉页脚信息”评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。
更新动态
2024年05月11日
2024年05月11日
- ABC唱片-《模拟万岁.立体魔声》6N纯银镀膜[WAV+CUE]
- 叶启田.1992-唱新歌·演奏畅销金曲【吉马】【WAV+CUE】
- 品冠.2004-门没锁(引进版)【滚石】【WAV+CUE】
- 万玲琳.2020-晚安,失眠的我(EP)【灵气音乐】【WAV分轨】
- 缇ゆ槦銆婄兢鏄熸瓕鏇插悎闆嗐€媅FLAC/鍒嗚建][3.1G]
- 尚雯婕《尚雯婕歌曲合集》[320K/MP3][198MB]
- 半吨兄弟《迷人烟嗓》 [WAV+CUE][527.2MB]
- 欢乐钓鱼大师锦标赛怎么玩 欢乐钓鱼大师锦标赛玩法介绍
- 欢乐钓鱼大师怎么加好友 欢乐钓鱼大师加好友方法
- 欢乐钓鱼大师鱼竿能不能重置 欢乐钓鱼大师鱼竿重置介绍
- 浩声雅韵-《2023第十八届南宁(东盟)国际视听展》珍藏版纪念CD[WAV+CUE]
- 江淑娜1996-长夜悄悄【点将】WAV+CUE
- 王馨平.1993-LINDAWONG【宝丽金】【WAV+CUE】
- 外媒玩了50小时《哈迪斯2》!称比第一部还好玩
- 陈奕迅.2013-MUSIC.LIFE精选4CD【英皇娱乐】【WAV+CUE】