Use ASP to register DLL files on the client

Source: Internet
Author: User
This method introduces the DLL file used by the user.
<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>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.