"Interface not supported" executing a VBS script

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
sine
Posts: 37
Joined: Wed Feb 07, 2007 6:42 am

"Interface not supported" executing a VBS script

Post by sine »

If I try to execute this script (one of the exemple folder of HM)

Code: Select all

'-----------------------------------------------------------------------------
'File    : DiskSpaces.VBS
'Purpose : Sample script test for Advanced Host Monitor
'Comment : Checks difference between free disk space on drive C: and drive D: 
'          Sets status to "Bad" when drive C: has less amount of free space 
'          than drive D:
'Language: VBScript
'Version : 1.0
'Author  : KS-Soft (www.ks-soft.net)
'-----------------------------------------------------------------------------
Option Explicit

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:"

'---- entry point ----

FUNCTION PerformTest()
  DIM DeltaSpace
  DeltaSpace = AvailableSpace("C:\") - AvailableSpace("D:\")
  IF DeltaSpace >= 0 THEN
     performtest = statusOk+CStr(DeltaSpace/1024)+" Kb"
  ELSE
     performtest = statusBad+CStr(DeltaSpace/1024)+" Kb"
  END IF
END FUNCTION

'------ function -----

FUNCTION AvailableSpace(drvPath)
  Dim fso, d
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set d = fso.GetDrive(fso.GetDriveName(drvPath))
  AvailableSpace = d.AvailableSpace
END FUNCTION

i've the error "interface not supported".
it's the same with every VBS script I have tested.
it's this a bug??

HM running on windows Vista.

p.s.
if i try to execute the test manually calling the function performtest it works fine.

helpme :(
[/code]
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

Actually we recommend to run HostMonitor on Windows 2000 SP4, Windows 2003 SP1 or SP2. Vista is not pretty stable system to run HostMonitor. We will try to investigate the problem an let you know ASAP.
Could you try to use "Shell Script" test method? "Shell Script" test method allows you to execute .vbs scripts as well.
http://www.ks-soft.net/hostmon.eng/mfra ... m#chkShell

Regards,
Max
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Re: "Interface not supported" executing a VBS scri

Post by KS-Soft Europe »

sine wrote:i've the error "interface not supported".
it's the same with every VBS script I have tested.
Ok. 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: Select all

regsvr32 C:\WINDOWS\system32\msscript.ocx
Regards,
Max
sine
Posts: 37
Joined: Wed Feb 07, 2007 6:42 am

Post by sine »

ok.....now works fine
tnx
Post Reply