If, on windows, the agent is launched through an external application (i.e. a third parties launcher, a custom console or else), any UserParameter configured returns an error 0x00000005 (Access is denied) while executed.
I bypassed the issue passing the option CREATE_BREAKAWAY_FROM_JOB...