Based on what you're referrencing in your post, it appears you're trying to use custom actions with the Protect Agents. This feature is actually not supported.
Custom actions can only be performed through agentless operations as when you use %pathstofixes%, this variable will only truely exist in the agentless deployments.
I know that others have asked for agents to be able to do custom actions in the past. I would recommend that you submit a feature request to see if we can add custom action support to agents in a future build.