国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > VBScript > 正文

利用vbs腳本實現設置IE的打印頁眉頁腳信息

2020-07-26 12:05:32
字體:
來源:轉載
供稿:網友
將下面的內容保存成.vbs文件,然后雙擊執行,在打開ie頁面,在頁面中點擊右鍵,看看菜單中多了個什么?。。海?nbsp;


    
復制代碼 代碼如下:

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 _ 
            +"http://設置網頁打印的頁眉頁腳為默認值"+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://設置右鍵菜單上的顯示文字" +vbcrlf _ 
            +"http://首先刪除原來的項,然后再設置新的項"+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 _ 
            +"http://關閉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://設置網頁打印的頁眉頁腳為空" +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://設置右鍵菜單上的顯示文字" +vbcrlf _ 
            +"http://首先刪除原來的項,然后再設置新的項" +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 _ 
            +"http://關閉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" 

以上信息與文章正文是不可分割的一部分,如果您要轉載本文章,請保留以上信息,謝謝! 
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 汉中市| 浙江省| 蒲江县| 大荔县| 蓬莱市| 田东县| 江都市| 板桥市| 资兴市| 闻喜县| 丹东市| 右玉县| 明光市| 苗栗县| 胶州市| 即墨市| 页游| 正安县| 凤阳县| 陆川县| 邹城市| 莱州市| 灵川县| 腾冲县| 元江| 三都| 大同市| 射洪县| 英超| 中卫市| 青海省| 迁安市| 余姚市| 格尔木市| 通化县| 九龙城区| 闽侯县| 祁连县| 九龙坡区| 准格尔旗| 花垣县|