Wrappings for .exe extension in nsclient.ini?
Posted: Thu Mar 26, 2020 12:26 pm
Hi there,
I'm writing a custom plugin that'll run on a Windows server where nsclient is already installed and working. I'm trying to build a dot net plugin (a dot net console application) rather than a javascript plugin here.
In nsclient.ini I have the following (the dot net binary to run is NC_InterfaceDHL.exe, aliased as valida_log):
[/settings/external scripts/wrappings]
bat = scripts\\%SCRIPT% %ARGS%
ps1 = cmd /c echo scripts\\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -ExecutionPolicy Bypass -command –
vbs = cscript.exe //T:30 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%
js = cscript.exe //T:30 //NoLogo %SCRIPT% %ARGS%
[/settings/external scripts/wrapped scripts]
valida_log = scripts\\dhl\\NC_InterfaceDHL.exe $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$
[/settings/external scripts/alias]
alias_valida_log = valida_log
For now I am getting an error on the nsclient log file:
error:c:\source\master\modules\CheckExternalScripts\script_provider.cpp:39: Failed to find wrapping for type: exe
So I guess I need to add something to the [/settings/external scripts/wrappings] section of nsclient.ini in order to support .exe files, but I don't know what to add here.
Any help is greatly appreciated, thank you.
I'm writing a custom plugin that'll run on a Windows server where nsclient is already installed and working. I'm trying to build a dot net plugin (a dot net console application) rather than a javascript plugin here.
In nsclient.ini I have the following (the dot net binary to run is NC_InterfaceDHL.exe, aliased as valida_log):
[/settings/external scripts/wrappings]
bat = scripts\\%SCRIPT% %ARGS%
ps1 = cmd /c echo scripts\\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -ExecutionPolicy Bypass -command –
vbs = cscript.exe //T:30 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%
js = cscript.exe //T:30 //NoLogo %SCRIPT% %ARGS%
[/settings/external scripts/wrapped scripts]
valida_log = scripts\\dhl\\NC_InterfaceDHL.exe $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$
[/settings/external scripts/alias]
alias_valida_log = valida_log
For now I am getting an error on the nsclient log file:
error:c:\source\master\modules\CheckExternalScripts\script_provider.cpp:39: Failed to find wrapping for type: exe
So I guess I need to add something to the [/settings/external scripts/wrappings] section of nsclient.ini in order to support .exe files, but I don't know what to add here.
Any help is greatly appreciated, thank you.