some scripting languages cannot be executed via the RUNSCRIPT command.
THis is due to trying to minimize the security risks that the ability to run scripts as the System group may pose.
To run a script or executable.
first make sure the script is in the Script directory usually:
C:\Program Files\Montitech\NC_Net\script\
lets pretend the script is called test.exe
to run the script you would issue the command from check_nt
Check_nc_net -H HOST_TO_CHECK -v RUNSCRIPT -l "test.exe"
if the script contained arguments then the option to trust NC_net must be turned on in the Startup.cfg. Also scripts cannot be run from other directories since the command disalows .. in the path.
If you are trying to run a script that does not run. due to needing to be invoked via the binary, for example needing to invoke VBRUN or Perl Binary, then you may be able to wrap the script in a Batch program (test.bat) an axample of this is: you cannot run the command "dir" from RUNSCRIPT but you can run the command "test.bat" that runs the command "dir"
the default working directory of RUNSCRIPT may be the Windows or system directoy so take causion and make sure scripts/executables have been tested before they are invoked remotely.
If anyone needs help with creating an executable or script I am availible for contract work. Contact me via NC_Net@montitech.com
Tony
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I just start Nagios and wonder how can i execute a vbs script with nc_net any concreat exemple pls?
is that using 101 runscript ?
101 testVBS -l C:\Program Files\Montitech\NC_Net\script\testVBS.vbs
Thanks
Ely
some scripting languages cannot be executed via the RUNSCRIPT command.
THis is due to trying to minimize the security risks that the ability to run scripts as the System group may pose.
To run a script or executable.
first make sure the script is in the Script directory usually:
C:\Program Files\Montitech\NC_Net\script\ lets pretend the script is called test.exe
to run the script you would issue the command from check_nt
Check_nc_net -H HOST_TO_CHECK -v RUNSCRIPT -l "test.exe"
if the script contained arguments then the option to trust NC_net must be turned on in the Startup.cfg. Also scripts cannot be run from other directories since the command disalows .. in the path.
If you are trying to run a script that does not run. due to needing to be invoked via the binary, for example needing to invoke VBRUN or Perl Binary, then you may be able to wrap the script in a Batch program (test.bat) an axample of this is: you cannot run the command "dir" from RUNSCRIPT but you can run the command "test.bat" that runs the command "dir"
the default working directory of RUNSCRIPT may be the Windows or system directoy so take causion and make sure scripts/executables have been tested before they are invoked remotely.
If anyone needs help with creating an executable or script I am availible for contract work. Contact me via NC_Net@montitech.com
Tony