Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.12.3 available

The official documentation can be found on https://wiki.ocsinventory-ng.org. Read it before asking your question.

OCS and launch windows command to add a planed task

Hi

I have a question ?

I need to create a planed tasked with all station of my inventory.

I try to launch

schtasks /create /tn "New Task" /tr "\"%ProgramFiles%\TheGreenBow\TheGreen\conf.exe\" /open:vpnconf" /sc onstart

I try this command by Launch

and try to execute a script with this command in the batch script.

in two case it's create an error

however when I excecute localy this command or with a script, there are no error and the task is add on the system.

So my question ? is it possible to used schtasks command via OCS.

Thanks in advence for your answer.

Best Regards.
in OCS Inventory NG agent for Windows by (420 points)

1 Answer

0 votes
it ist definitly possible to use the task scheduler - it depends on your OS

i used it to deploy a program - but i remember that it was a problem to deploy the openvpn client because of some signed driver issues

this command should start a script which installs a program

set taskvar1=once

SCHTASKS /Create /F /V1 /Z /SC %taskvar1% /TN "OCSDeploy" /RU "" /TR "%windir%\temp\ocstask.cmd" /ST %hhmm%

to get the time please look here

http://arstechnica.com/civis/viewtopic.php?t=390290
by (24.5k points)
 
Powered by Question2Answer
...