利用ASP在客户端注册DLL文件

2008/10/4 17:05:44 来源:互联网 【 】 浏览:5685次
本 程 式 方 法 介 绍 利 用 客 户 端 注 册 dll 文 件。
<html>
<head id="head1">
<meta content="text/html charset=gb2312" http-equiv="content-type">
<title id="title">client use asp to register the exist dll file</title>
</head>
<body bgcolor="skyblue" topmargin=0 leftmargin="0" rightmargin="0" bottommargin="0">
<div align="center">
<table><tr><td>client use asp to register the exist dll file</td></tr></table>
</div>
<input type="button" value="register dll" name="reg_dll" language="vbscript" onclick="fun_reg()">
</body>
</html>
<script language="vbscript">
we had produce the webreport.dll file and place in the client
win <98 \windows\system\webreport.dll
win 98 \windows\system32\webreport.dll
win nt40 \winnt\system\webreport.dll
win 2000 \winnt\system32\webreport.dll
sub fun_reg()
dim wshshell,fso
set wshshell = createobject("wscript.shell")
set fso = createobject("scripting.filesystemobject")

if fso.fileexists("\windows\system\webreport.dll") then
wshshell.run "regsvr32 /s \windows\system\webreport.dll" , 1, true
msgbox "register \windows\system\webreport.dll file sucess!"

elseif fso.fileexists("\windows\system32\webreport.dll") then
wshshell.run "regsvr32 /s \windows\system32\webreport.dll" , 1, true
msgbox "register \windows\system32\webreport.dll file sucess!"

elseif fso.fileexists("\winnt\system\webreport.dll") then
wshshell.run "regsvr32 /s \winnt\system\webreport.dll" , 1, true
msgbox "register \winnt\system\webreport.dll file sucess!"

elseif fso.fileexists("d:\winnt\system32\webreport.dll") then
wshshell.run "regsvr32 /s d:\winnt\system32\webreport.dll" , 1, true
msgbox "register d:\winnt\system32\webreport.dll file sucess!"
else
msgbox "not found the register dll file!"
end if
set fso=nothing
set wshshell=nothing

end sub
</script>
  • 上一篇文章:ASP中用Jmail发送邮件的实例
  • 下一篇文章:一个ASP获取服务器驱动器类型的例子
    当前地址:https://dns2003.com:443/help/hlp_dtl.asp?nid=10000334
    更多帮助登录: http://www.dns2003.com/help
    业务请咨询E网时代客服部