What dictates Execution Log Status?

In the Endpoint Manager/Comodo Execution Log Status for Procedures, what exactly dictates whether a script runs as a Success or Fail, particularly with custom scripts. I often use PowerShell scripts, I will copy and paste into the premade Procedure for running PS scripts. The Log will show SUCCESS if the script it runs on the PC runs at all, regardless of the results of the script.

Let’s say I am looking for a directory on a PC, which PS reports back on under the “Details” tab. If it finds that directory, it continues with the script. If it finds neither directory, I want it to report back as a failure.

Basically, how do we customize code to affect the Execution log to better review script results? Is it the Python that Comodo uses, if so, where can we modify it? Or can we modify my PS script so that the results under Details affect the Execution Log?

1 Like

hi @Jrsysadmin24

Yes, Python is used. Usually additional output can be added in output of the procedure via print in Python.

could you please share us the script to support@xcitium.com and we will escalate it to the scripting team to look into it

thank you

It’s based on exit code. We have the same issue we encode PowerShell inside the Python script, so the exit codes from PowerShell is not reflected. If you want to see the true status of SUCCESS or FAIL then you MUST write the entire procedure code in Python.
Writing code in Python is a problem because of the following:
→ Python used is 2.x which does not have all the libaries.
→ We cannot install our own Python version and definitiely cannot add libraries.

Due to these issues, we also resort to PowerShell but exit code are issue like you are facing.

What is the solution?
Xcitium MUST allow the procedure code to support PowerShell in addition to Python. And if they cannot do that then they must constantly update the Python version along with various libraries with each EM agent version.

Unfortunately this is not happening and i have not seen Python getting updated or PowerShell code support being provided from the last 2 yrs. Its frustrating to say the least.

[ITA-186] Upgrade scripting to Python 3 | Voters | ITarian

1 Like

this is something that we are working on upgrading to 3.x - we will share the final ETA soon.

1 Like