AVIRA AntiVirus barks only with Debugger enabledMarco2007 wrote:I bought the license for two years.

AVIRA AntiVirus barks only with Debugger enabledMarco2007 wrote:I bought the license for two years.
Code: Select all
strComputer = "."
Set objWMIService = GetObject( _
"winmgmts:\\" & strComputer & "\root\cimv2")
Set IPConfigSet = objWMIService.ExecQuery _
("Select IPAddress from Win32_NetworkAdapterConfiguration ")
For Each IPConfig in IPConfigSet
If Not IsNull(IPConfig.IPAddress) Then
For i=LBound(IPConfig.IPAddress) _
To UBound(IPConfig.IPAddress)
WScript.Echo IPConfig.IPAddress(i)
Next
End If
Next
Can you provide an example on how you called that VBS script? Did you (or have you?) found a way to call PB functions from VBS?SFSxOI wrote:srod,
Very Nice, its already helpful in a project i'm working on. Thank you very much.
Tried it out on some vbs i had laying around, doesn't work in this type of vbs code tho:
and the flash demo doesn't work here on Vista UltimateCode: Select all
strComputer = "." Set objWMIService = GetObject( _ "winmgmts:\" & strComputer & "\root\cimv2") Set IPConfigSet = objWMIService.ExecQuery _ ("Select IPAddress from Win32_NetworkAdapterConfiguration ") For Each IPConfig in IPConfigSet If Not IsNull(IPConfig.IPAddress) Then For i=LBound(IPConfig.IPAddress) _ To UBound(IPConfig.IPAddress) WScript.Echo IPConfig.IPAddress(i) Next End If Next
Code: Select all
XIncludeFile "COMate.pbi"
Define.COMateObject objWMIService, processorObject
collection.COMateEnumObject
strComputer.s = "."
objWMIService = COMate_GetObject("winmgmts:\\" + strComputer + "\root\cimv2", "")
If objWMIService
collection = objWMIService\CreateEnumeration("ExecQuery('Select * from Win32_Processor')")
If collection
processorObject = collection\GetNextObject()
While processorObject
Debug processorObject\GetStringProperty("currentClockSpeed")
processorObject\Release()
processorObject = collection\GetNextObject()
Wend
EndIf
EndIf
Code: Select all
XIncludeFile "COMate.pbi"
Define.COMateObject objWMIService, IPConfig
IPConfigSet.COMateEnumObject
*var.VARIANT
strComputer.s = "."
objWMIService = COMate_GetObject("winmgmts:\\" + strComputer + "\root\cimv2", "")
If objWMIService
IPConfigSet = objWMIService\CreateEnumeration("ExecQuery('Select IPAddress from Win32_NetworkAdapterConfiguration')")
If IPConfigSet
IPConfig = IPConfigSet\GetNextObject()
While IPConfig
If IPConfig
*var = IPConfig\GetVariantProperty("IPAddress")
Debug *var\vt
VariantClear_(*var)
IPConfig\Release()
EndIf
IPConfig = IPConfigSet\GetNextObject()
Wend
EndIf
EndIf
Code: Select all
XIncludeFile "COMate.pbi"
object.COMateObject
a.l = 20
object = COMate_CreateObject("ActiveXTest.clsActiveXTest")
If object = 0
COMate_RegisterActiveXServer("Projekt1.dll")
object = COMate_CreateObject("ActiveXTest.clsActiveXTest")
EndIf
If object
object = COMate_CreateObject("ActiveXTest.clsActiveXTest")
If object
object\Invoke("Test1(" + Str(@a) + " as long BYREF)")
object\Release()
EndIf
COMate_UnRegisterActiveXServer("Projekt1.dll", #False)
Debug "New value of a is " + Str(a)
EndIf
This is what your above returns:srod wrote:SFSxOI : can you run the following to see what kind of variants are being returned? I need to know the value being debugged?
Code: Select all
XIncludeFile "COMate.pbi" Define.COMateObject objWMIService, IPConfig IPConfigSet.COMateEnumObject *var.VARIANT strComputer.s = "." objWMIService = COMate_GetObject("winmgmts:\" + strComputer + "\root\cimv2", "") If objWMIService IPConfigSet = objWMIService\CreateEnumeration("ExecQuery('Select IPAddress from Win32_NetworkAdapterConfiguration')") If IPConfigSet IPConfig = IPConfigSet\GetNextObject() While IPConfig If IPConfig *var = IPConfig\GetVariantProperty("IPAddress") Debug *var\vt VariantClear_(*var) IPConfig\Release() EndIf IPConfig = IPConfigSet\GetNextObject() Wend EndIf EndIf
Code: Select all
1
1
1
1
8204
1
1
1
1
1
1
Code: Select all
Define.COMateObject objWMIService, IPConfig
Define.s strComputer = "."
objWMIService = COMate_GetObject("winmgmts:\" + strComputer + "\root\cimv2", "")
If objWMIService
IPConfig = objWMIService\ExecQuery("Select IPAddress from Win32_NetworkAdapterConfiguration")
If IPConfig
While IPConfig
Debug IPConfig\IPAddress
EndIf
Wend
EndIf
EndIf