中华考试网·阅读新闻
编程开发 > ASP > 文章内容

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

ASP编程教程技巧综合大全(34)
咨询热线:4000-525-585(免长途费)