"Interface not supported" executing a VBS script o

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
Seitter
Posts: 27
Joined: Wed Jan 08, 2003 6:00 pm

"Interface not supported" executing a VBS script o

Post by Seitter »

hello

i am running Hostmoni 7.22c on w2003 and RMA 3.70 on w2008

when rma on W2008-server executes vb-scripts the error
"Interface not supported"appears

the solution for Vista, you see below doesn't work

We have managed to figure it out. Looks like msscript.ocx was not properly registered on some Vista installations. So, you should registered it manualy by typing the following command in command line prompt:
Code: regsvr32 C:\WINDOWS\system32\msscript.ocx

i need help
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

May I see your script?
Could you try to perform some of simple scripts included into package (located in Examples\ subfolder)?

Regards
Alex
Seitter
Posts: 27
Joined: Wed Jan 08, 2003 6:00 pm

Post by Seitter »

the script "diskspaces.vbs" produces the same error

my script:
' Region Description
'
' Name: HM_McAfeePatternDate
' Author: W. Seitter
' Version: 1, vom 26.09.2007
' Description: prüft ob das patternfile älter als n (4) Tage ist
' EndRegion

Const statusAlive = "Host is alive:"
Const statusDead = "No answer:"
Const statusUnknown = "Unknown:"
Const statusNotResolved = "Unknown host:"
Const statusOk = "Ok:"
Const statusBad = "Bad:"
Const statusBadContents = "Bad contents:"

AlertThreshold = 4
Datumsdiff = 5
DatDate = "nicht ermittelt"

'MsgBox "Ergebnis: " & PerformTest & " " & Date


Function PerformTest()
Dim RegKeys, RegTempK, RegTempE, i, RegKey ' Einige Variablen erstellen.
Set RegKeys = CreateObject("Scripting.Dictionary")
RegKeys.Add "7.1", "HKLM\Software\Network Associates\ePolicy Orchestrator\Application Plugins\VIRUSCAN7100\Datdate"
RegKeys.Add "8.0", "HKLM\Software\Network Associates\ePolicy Orchestrator\Application Plugins\VIRUSCAN8000\Datdate"
RegKeys.Add "8.5", "HKLM\Software\Network Associates\ePolicy Orchestrator\Application Plugins\VIRUSCAN8600\Datdate"
RegTempE = RegKeys.Items ' Die Einträge holen.
RegTempK = RegKeys.Keys ' Die Keys holen.
For i = 0 To RegKeys.Count -1 ' Das Array durchlaufen.
RegKey = RegTempE(i)
If KeyRead(RegKey)Then
If Datumsdiff > AlertThreshold Then
PerformTest = statusBad + "Vers.: " + RegTempK(i) +" DatDate:" + DatDate
Else
PerformTest = statusOk + "Vers.: " + RegTempK(i) +" DatDate:" + DatDate
End If
Exit Function
End If
Next
PerformTest = statusUnknown
End Function

Function KeyRead(RegKey)
On Error Resume Next
Set objshell = CreateObject("WScript.Shell")
DatDate = objshell.RegRead(RegKey)
KeyRead = (Err.number = 0)
On Error Goto 0
If KeyRead Then
SuchTreffer = InStr(DatDate, "/") ' Test ob Datum als 10 März 2007 oder 03/10/2007
If SuchTreffer = 0 Then
CheckDate = DateValue(DatDate)
Else
DatArray = Split(DatDate, "/", -1)
CheckDate = DateValue(DatArray(1) & "." & DatArray(0) & "." & DatArray(2))
End If
Datumsdiff = DateDiff("d", CheckDate, Date)
End If
End Function
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

We don't know reason of the problem yet...
However this is workaround - use Shell Script test method instead of Active Script
http://www.ks-soft.net/hostmon.eng/mfra ... m#chkShell
Does it work?

You will need to remove declaration of Function PerformTest() move that code into main part of script.. or simply call Function PerformTest() from main script code. E.g.
WScript.StdOut.Write 'ScriptRes:'+PerformTest()

Regards
Alex
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

PS
We were able to reproduce this problem on Windows 2008
Error occured because msscript.ocx was not registered. We registered OCX (regsvr32 msscript.ocx) and everything works fine - HostMonitor and RMA executes scripts just fine (well, or scripts returns Ok status, your scripts return Unknown status)

Have you seen message like "DllRegisterServer in msscript.ocx secceeded" when you typed regsvr32 msscript.ocx?

Regards
Alex
Seitter
Posts: 27
Joined: Wed Jan 08, 2003 6:00 pm

Post by Seitter »

after correct registration, problem solved

Thanks
Wolfgang
Post Reply