Quote Originally Posted by Ton van Vonderen View Post
In my Observatorium I use a RCW box for remote control fo power switches. https://www.teracomsystems.com/ether...le-tcw181b-cm/
For switching ON or Off a relais in a *.vbs script, I use following code:
---------------------
Dim TCW
Set TCW = CreateObject ("WScript.Shell")
TCW.Run "c:\usr\bin\snmpset. c:\usr\bin\snmpset.exe 1 -c private 192.168.1.221 1.3.6.1.4.1.38783.3.2.0 integer 1" 'R1 ON
set TCW = nothing
---------------------
What would be the equivalent code for eg the SampleShutdownObs.js script?
I am on the road, see my post at the top of the Comm Center. Here is an untested guess. If it doesn’t work you’ll need to wait until I get back and clear my urgent issues. Or you could look up Util.ShellExc() in ACP Help, scripting. Or you could convert the above VBS to JS by using new ActiveXObject() in place of CreateObject() and make other fairly obvious and trivial syntax changes. Note below the doubled \\

Util.ShellExec(“c:\\usr\\bin\\snmpset.exe”, “1 -c private 192.168.1.221 1.3.6.1.4.1.38783.3.2.0 integer 1”);