avielc 56 Posted March 13, 2016 Share Posted March 13, 2016 Hi Everyone, I'd like to use Run Command Task on ESET Remote Administrator 6.x to run Ninite with some parameters. How can i define the working directory which is a shared folder on the network. if you can provide some information regarding that. what kind of format do i use for working directory? What can i specify in terms of regular expressions for the command line, and adding command line parameters. Thank you. Link to comment Share on other sites More sharing options...
ESET Staff MartinK 384 Posted March 13, 2016 ESET Staff Share Posted March 13, 2016 Hi Everyone, I'd like to use Run Command Task on ESET Remote Administrator 6.x to run Ninite with some parameters. How can i define the working directory which is a shared folder on the network. if you can provide some information regarding that. what kind of format do i use for working directory? What can i specify in terms of regular expressions for the command line, and adding command line parameters. Thank you. On Windows, content of command line is written into regular bat file and executed - it can even be a multi-line set of commands. In case you are not sure, I would suggest to create testing .bat on target machine and once it works, you may try to use it from ERA. Beware of multiple limitations as file will be executed with AGENT's permissions (Local System?) and I am not sure where from - so do not rely on default working directory. Please avoid usage of UTF8 paths or parameters, as it may cause problems on older Windows machines. Link to comment Share on other sites More sharing options...
avielc 56 Posted March 13, 2016 Author Share Posted March 13, 2016 Thanks for the quick reply, I have tried to run an .batch file from a network share, but that doesn't work. *note* i've been at this reply for the last 5 hours, trying to figure out all sorts of bypasses to this issue. I'm unable to figure out where the script fails, or what doesn't succeed to run. Is there any place I can find the log of the agent? (something more detailed than "task started, application finished running, Done") Thanks Link to comment Share on other sites More sharing options...
ESET Staff MartinK 384 Posted March 14, 2016 ESET Staff Share Posted March 14, 2016 Thanks for the quick reply, I have tried to run an .batch file from a network share, but that doesn't work. *note* i've been at this reply for the last 5 hours, trying to figure out all sorts of bypasses to this issue. I'm unable to figure out where the script fails, or what doesn't succeed to run. Is there any place I can find the log of the agent? (something more detailed than "task started, application finished running, Done") Thanks Unfortunately script is executed "asynchronously" and therefore AGENT is not collecting its output. In case you see "Task successful" in ERA it means script started, but tells you nothing about it's content results. We are aware it is not ideal but I would suggest to use some kind of "logging" in your task - at least writing to some file. Have you tried to execute mentioned bat file manually? Even Windows itself has some limitations when network shares are involved and it has problem with mixing local and network locations. Link to comment Share on other sites More sharing options...
avielc 56 Posted March 14, 2016 Author Share Posted March 14, 2016 Thanks for the quick reply, I have tried to run an .batch file from a network share, but that doesn't work. *note* i've been at this reply for the last 5 hours, trying to figure out all sorts of bypasses to this issue. I'm unable to figure out where the script fails, or what doesn't succeed to run. Is there any place I can find the log of the agent? (something more detailed than "task started, application finished running, Done") Thanks Unfortunately script is executed "asynchronously" and therefore AGENT is not collecting its output. In case you see "Task successful" in ERA it means script started, but tells you nothing about it's content results. We are aware it is not ideal but I would suggest to use some kind of "logging" in your task - at least writing to some file. Have you tried to execute mentioned bat file manually? Even Windows itself has some limitations when network shares are involved and it has problem with mixing local and network locations. I did run it, i fear i have an issue with access to network shares as you mentioned, that leads me to have a couple of questions: 1. under what credentials the agent runs 2. Can I define credentials for the clients task? (just like you have such option for server tasks) 3. Are you aware of a way to bypass entering credentials using the .BAT file? (to gain access to network shares i will need to change user to network account, probably using a command like "runas") Thank you for the help! Link to comment Share on other sites More sharing options...
ESET Staff MartinK 384 Posted March 14, 2016 ESET Staff Share Posted March 14, 2016 1. under what credentials the agent runs It is running as service under "Local System account" by default - but it may be manually changed 2. Can I define credentials for the clients task? (just like you have such option for server tasks) No, it is currently not possible. 3. Are you aware of a way to bypass entering credentials using the .BAT file? (to gain access to network shares i will need to change user to network account, probably using a command like "runas") Unfortunately I have not encountered such script. Maybe you could inspire in generated live installer. It is technically bat file which drops another script and executes it under administrator privileges - but I am not sure it will be usable in this task. Link to comment Share on other sites More sharing options...
avielc 56 Posted March 14, 2016 Author Share Posted March 14, 2016 1. under what credentials the agent runs It is running as service under "Local System account" by default - but it may be manually changed Could you clarify and add information regarding that manual change? That could be the solution if I can change the user to some other network user. Link to comment Share on other sites More sharing options...
ESET Staff MartinK 384 Posted March 14, 2016 ESET Staff Share Posted March 14, 2016 1. under what credentials the agent runs It is running as service under "Local System account" by default - but it may be manually changed Could you clarify and add information regarding that manual change? That could be the solution if I can change the user to some other network user. Change is possible by manual change in "Services", but it is not documented - therefore I would recommend it only as a last resort because there may be issues with permissions required by ERAAgent itself. Link to comment Share on other sites More sharing options...
avielc 56 Posted March 15, 2016 Author Share Posted March 15, 2016 I'll wait with that for now. Thanks Martin! Link to comment Share on other sites More sharing options...
avielc 56 Posted March 17, 2016 Author Share Posted March 17, 2016 Just to let you know, Eventually i used task scheduler. not the greatest solution. but i'll live with it for now. Link to comment Share on other sites More sharing options...
Recommended Posts