autoit有没有自带的函数能实现Regsvr32 的功能?能否不用@ComSpec调用CMD的方式 ?
Run(@ComSpec & ' /c Regsvr32 /s "ET99_FULL.dll"', "", @SW_HIDE)autoit有没有自带的函数能实现Regsvr32 的功能?? $sDll = "WSHom.Ocx"
_RegisterServer($sDll)
Func _RegisterServer($sDll)
Local $fInit, $fError
Local $aCall = DllCall("ole32.dll", "long", "OleInitialize", "ptr", 0)
If Not @error Then $fInit = $aCall <> 1 ; The COM library is already initialized
$aCall = DllCall($sDll, "long", "DllRegisterServer")
If @error Then $fError = True
If $fInit Then DllCall("ole32.dll", "none", "OleUninitialize")
If $fError Then Return SetError(2, 0, False)
Return SetError($aCall <> 0, $aCall, $aCall = 0)
EndFunc
页:
[1]