最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

利用vbs腳本實(shí)現(xiàn)設(shè)置IE的打印頁眉頁腳信息

 更新時(shí)間:2007年02月26日 00:00:00   作者:  
這篇文章主要為大家分享下通過vbs腳本實(shí)現(xiàn)設(shè)置IE的打印頁眉頁腳信息的代碼,需要的朋友可以參考下
將下面的內(nèi)容保存成.vbs文件,然后雙擊執(zhí)行,在打開ie頁面,在頁面中點(diǎn)擊右鍵,看看菜單中多了個(gè)什么!?。海?nbsp;


    
復(fù)制代碼 代碼如下:

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" 

    //先創(chuàng)建文件 
    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 _ 
            +"http://設(shè)置網(wǎng)頁打印的頁眉頁腳為默認(rèn)值"+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 _ 
            +"http://設(shè)置右鍵菜單上的顯示文字" +vbcrlf _ 
            +"http://首先刪除原來的項(xiàng),然后再設(shè)置新的項(xiàng)"+vbcrlf  _ 
            +"on error resume next" +vbcrlf _ 
            +"hkey_key=hkey_root+hkey_path+""\menuext\打印時(shí)恢復(fù)頁眉頁腳\""" +vbcrlf _ 
            +"regwsh.regdelete hkey_key" +vbcrlf _ 
            +"hkey_key=hkey_root+hkey_path+""\menuext\打印時(shí)去掉頁眉頁腳\""" +vbcrlf _ 
            +"regwsh.regwrite hkey_key,filepath" +vbcrlf _ 
            +"http://關(guān)閉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 _ 
            +"http://設(shè)置網(wǎng)頁打印的頁眉頁腳為空" +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 _ 
            +"http://設(shè)置右鍵菜單上的顯示文字" +vbcrlf _ 
            +"http://首先刪除原來的項(xiàng),然后再設(shè)置新的項(xiàng)" +vbcrlf _ 
            +"on error resume next"+vbcrlf  _ 
            +"hkey_key=hkey_root+hkey_path+""\menuext\打印時(shí)去掉頁眉頁腳\""" +vbcrlf _ 
            +"regwsh.regdelete hkey_key"+vbcrlf  _ 
            +"hkey_key=hkey_root+hkey_path+""\menuext\打印時(shí)恢復(fù)頁眉頁腳\""" +vbcrlf _ 
            +"regwsh.regwrite hkey_key,filepath" +vbcrlf _ 
            +"http://關(guān)閉regwsh" +vbcrlf _ 
            +"set regwsh=nothing"+vbcrlf  _ 
        +"</script>") 
    fso.close 

    set regwsh=wscript.createobject("wscript.shell") 
    hkey_key=hkey_root+hkey_path+"\menuext\打印時(shí)去掉頁眉頁腳\" 
    regwsh.regwrite hkey_key,"c:\pagesetup_null.htm" 

以上信息與文章正文是不可分割的一部分,如果您要轉(zhuǎn)載本文章,請(qǐng)保留以上信息,謝謝! 

相關(guān)文章

最新評(píng)論

全南县| 罗江县| 沁源县| 奇台县| 新竹市| 瑞安市| 宁都县| 焉耆| 新乐市| 嘉荫县| 滦南县| 余姚市| 新绛县| 凭祥市| 台湾省| 白朗县| 吉首市| 鄱阳县| 灵丘县| 康乐县| 仁寿县| 合肥市| 丹阳市| 霍山县| 聂荣县| 隆回县| 同江市| 工布江达县| 廉江市| 河曲县| 宁武县| 丹巴县| 咸宁市| 梅州市| 惠东县| 叶城县| 洛隆县| 棋牌| 尉氏县| 抚宁县| 台安县|