使用VBScript編輯註冊表, 設定電腦允許ActiveX的才可以! 不知道使用ASP.NET如何寫?
<script language="VBScript">
dim hkey_root,hkey_path,hkey_key
hkey_root="HKEY_CURRENT_USER"
hkey_path="\Software\Microsoft\Internet Explorer\PageSetup"
'on error resume next
Set RegWsh = CreateObject("WScript.Shell")
hkey_key="\header"
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"" '//清空頁眉
hkey_key="\footer"
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"" '//清空頁腳
hkey_key="\margin_top"
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"0.74803" '//19mm
hkey_key="\margin_bottom"
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"0.74803" '//19mm
hkey_key="\margin_left"
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"0.74803" '//19mm
hkey_key="\margin_right"
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"0.74803" '//19mm
'//
</script>