Save the following content as a. vbs file and double-click it to execute it. On the ie page, right-click the page to check what is added in the menu !! :)
Copy codeThe Code is as follows: 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"
// Create a file first
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 _
+ "// Set the default value of the page header and footer to" + vbcrlf _
+ "Set regwsh = createobject (" wscript. shell "") "+ vbcrlf _
+ "Hkey_key =" "\ pagesetup \ header" + vbcrlf _
+ "Regwsh. regwrite hkey_root + hkey_path + hkey_key," "& w & B page number: & p/& p" + vbcrlf _
+ "Hkey_key =" "\ pagesetup \ footer" + vbcrlf _
+ "Regwsh. regwrite hkey_root + hkey_path + hkey_key," "& u & B & d" + vbcrlf _
+ "// Set the display text on the right-click menu" + vbcrlf _
+ "// First Delete the original item, and then set the new item" + vbcrlf _
+ "On error resume next" + vbcrlf _
+ "Hkey_key = hkey_root + hkey_path +" "\ menuext \ restore the header and footer when printing \" + vbcrlf _
+ "Regwsh. regdelete hkey_key" + vbcrlf _
+ "Hkey_key = hkey_root + hkey_path +" "\ menuext \ remove the header and footer when printing \" + vbcrlf _
+ "Regwsh. regwrite hkey_key, filepath" + vbcrlf _
+ "// Disable 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 _
+ "// Set the blank header and footer for web page printing" + 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 _
+ "// Set the display text on the right-click menu" + vbcrlf _
+ "// First Delete the original item, and then set the new item" + vbcrlf _
+ "On error resume next" + vbcrlf _
+ "Hkey_key = hkey_root + hkey_path +" "\ menuext \ remove the header and footer when printing \" + vbcrlf _
+ "Regwsh. regdelete hkey_key" + vbcrlf _
+ "Hkey_key = hkey_root + hkey_path +" "\ menuext \ restore the header and footer when printing \" + vbcrlf _
+ "Regwsh. regwrite hkey_key, filepath" + vbcrlf _
+ "// Disable regwsh" + vbcrlf _
+ "Set regwsh = nothing" + vbcrlf _
+ "</Script> ")
Fso. close
Set regwsh = wscript. createobject ("wscript. shell ")
Hkey_key = hkey_root + hkey_path + "\ menuext \ remove the header and footer when printing \"
Regwsh. regwrite hkey_key, "c: \ pagesetup_null.htm"
The above information is an integral part of the text. If you want to reprint this article, please keep the above information. Thank you!