Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Registering Components Remotely

Hello,

I am using the below code to both register and unregister components on my
server. I have no problem running this script on my development server but
on my production "IntraNet" server it does nothing although it appears to
run successfully.

My only resolve is to register and unregister components at the server. I
know this must be permissioning "thing" but cannot figure out what
permissions to set. It appears that I have rights to run regsrv32.exe.
Where else should I look?

BTW the components and the registration and unregistration server are in a
sub folder under the wwwroot, with Integrated Authentication.

Thanks,

Dan

Response.Write("Current Path: " & _
Server.MapPath(Request.ServerVariables("SCRIPT_NAME")))

''Work only if Path string includes the regsvr32 /u /s
Path = Request.Form("Path")

If Path <> "" Then
filepath = Replace(Path, "regsvr32 /u /s", "")
filepath = Trim(filepath)
Response.Write("<br><br>File Path: " & filepath)

Dim WshShell, fso
Set WshShell = CreateObject("Wscript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")

If fso.FileExists(filepath) Then
WshShell.run Path , 1, True
Response.Write "<br><br><br><div align=""center""><b>"
Response.Write "UnRegister <font color=""#C50D6F"">"
Response.Write Path & "</font> succeeded !</b></div>"

else
Response.Write "<br><br><br><div align=""center""><b>"
Response.Write "Target DLL not found at filepath!</b>"
Response.Write "</div>"
end if

Set fso = Nothing
Set WshShell = Nothing
[1804 byte] By [solex] at [2007-11-9 17:50:51]