I created a package in composer to copy the uninstall_agent to the Endpoint folder that I received from our InfoSec team. I created a policy to install the file in the correct path and under Files and Processes, I've tried adding different options below. It copies the the agent and when I do ls -l, it is has the correct rights. If I open up terminal and change directories and run sudo ./uninstall_agent it works.
Different options tried
sudo ./Library/Manufacturer/Endpoint\\ Agent/uninstall_agent
./Library/Manufacturer/Endpoint\\ Agent/uninstall_agent
sudo /Library/Manufacturer/Endpoint\\ Agent/uninstall_agent
/Library/Manufacturer/Endpoint\\ Agent/uninstall_agent
I'm testing it self-service and when it runs it says complete, but the details
Result of command:
Could not open the log file uninstall_agent.log for writing logs. Please verify that the directory exists and user has permission to create the file.
The Agent uninstallation failed.