HI,
I know your original question can be solved with Adam's advice.
My comment is just additional info.
Here is my verification.

In this case, your problem can be reproduced.

Add "C:\Windows\System32" to find setx.exe to Environment Variable Values, and then this action can be succeeded.


So, I recommended to check the content of your parameter. The error is returned by not RA but Windows.
I checked the behavior on RA 5.5.2 and 6.2.
Thanks
Yas