ASP编程教程技巧综合大全(35)
2015-8-24编辑:ljnbset
IF regMethod = "REG" Then ''Register
oShell.Run "c:\WINNT\system32\regsvr32.exe /s " & strFile, 0, False
exitcode = oShell.Run("c:\WINNT\system32\regsvr32.exe /s " & strFile, 0, False)
EchoB("regsvr32.exe exitcode = " & exitcode)
Else ''unRegister
oShell.Run "c:\WINNT\system32\regsvr32.exe /u/s " & strFile, 0, False
exitcode = oShell.Run("c:\WINNT\system32\regsvr32.exe /u/s " & strFile, 0, False)
EchoB("regsvr32.exe exitcode = " & exitcode)
End IF
Cleanup oShell
End Sub
Sub BuildOptions
EchoB("Register: ")
EchoB("unRegister: ")
End Sub
Function Echo(str)
Echo = Response.Write(str & vbCrLf)
End Function
Function EchoB(str)
EchoB = Response.Write(str & "
" & vbCrLf)
End Function
Sub Cleanup(obj)
If isObject(obj) Then
Set obj = Nothing
End IF
End Sub