以下是引用片段: public function CheckDll(strPath) dim objNode set objNode = SelectNode(strPath) if objNode is nothing then CheckDll = -1 else CheckDll = Cint(objNode.Attributes.getNamedItem(s_strAttributeName).nodeValue) end if end function |
’--------------------------------------
’目的: 将所有未注册的DLL注册
’返回: 如果有某个DLL注册失败就返回TRUE
’--------------------------------------
以下是引用片段: public function RegAllNode() dim objNode for each objNode in s_objNodeRoot.childNodes if objNode.Attributes.getNamedItem(s_strAttributeName).nodeValue = "0" then if Reg(objNode.childNodes.item(0).nodeValue , true) then objNode.Attributes.getNamedItem(s_strAttributeName).nodeValue = 1 else RegAllNode = true end if end if next end function |
’-----------------------------------------
’目的: 注册DLL
’参数: strPath: 要注册Dll文件路径
’ blnLoding: 是否等待注册完成才继续执行程序
’返回: 如果blnLoging=TRUE,注册成功就返回True
’-----------------------------------------
以下是引用片段: private function Reg(strPath , blnLoding) dim objShell set objShell = CreateObject("Wscript.Shell") if objShell.Run("regsvr32.exe /s " & strPath , , blnLoding) = 0 then Reg = true end if set objShell = nothing end function | 上一页 [1] [2] [3] [4] |