Contact Info

Crumbtrail

ActiveXperts.com » Support » Network Monitor » KB Article

 

Q6600110: Is there a scripted way to put checks on hold?

Sure. This can be done easily through the following VBSscript. Make sure the path to the configuration file (Config.sdf) is valid.
The following scripts sets the Check with ID=10434 on hold. Run the script from the Command Line using the CSCRIPT.EXE script interpreter.

Option Explicit

Dim strDbConn, objConn, strSqlQuery

strDbConn = "PROVIDER=Microsoft.SQLSERVER.CE.OLEDB.3.5;" &_
  "Data Source=C:\ProgramData\ActiveXperts\Network Monitor\Configuration\Config.sdf"

Set objConn  = CreateObject( "ADODB.Connection" )
objConn.Open strDbConn

' 
strSqlQuery  = "UPDATE Nodes SET OnHold=-1 WHERE ID=10434" 
objConn.Execute strSqlQuery

objConn.Close
(viewed: 169)