$(RANDOM) is not expanded Project->Set programs' arguments, and the program gets the string "$(RANDOM) " instead of the corresponding integer. It doesn't work no matter the variable extension syntax I use.
I don't know whether it's specific to RANDOM or whether variable extension does not work in Project->Set programs' arguments altogether. I guess that depending on which one it is, this might be either a bug or a feature request.
Diff:
I've modified the description a bit. The %RANDOM% syntax is specific to the cmd.exe and won't be possible.
OS was not specified, but testing with last nightly, works OK. Probably the OP used %RANDOM%.
Last edit: Miguel Gimenez 2022-01-17