欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

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

程序员文章站 2022-11-18 12:46:23
clientregdll.html本 程 式 方 法 介 绍 利 用 客 户 端 注 册 dll 文 件。 下 一 回 讲 解 客 户 端 如 何 获 得 dll 文 件。<...
clientregdll.html

本 程 式 方 法 介 绍 利 用 客 户 端 注 册 dll 文 件。
下 一 回 讲 解 客 户 端 如 何 获 得 dll 文 件。
<html>
<head id="head1">
<meta content="text/html charset=gb2312" http-equiv="content-type">
<title id="title">client use to register the exist dll file</title>
</head>
<body bgcolor="skyblue" topmargin=0 leftmargin="0" rightmargin="0" bottommargin="0">
<p align="center">
<table><tr><td>client use asp to register the exist dll file</td></tr></table>
</p>
<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 windowssystemwebreport.dll
win 98 windowssystem32webreport.dll
win nt40 winntsystemwebreport.dll
win 2000 winntsystem32webreport.dll
sub fun_reg()
dim wshshell,fso
set wshshell = createobject("wscript.shell")
set fso = createobject("scripting.filesystemobject")

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

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

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

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

end sub
</script>