That does sound strange. I run with a VoiceAttack plugin for iRacing called the Digital Race Engineer and that does prefer to have VA run as administrator. When I saw the option in the UI that seemed better than setting it in the shortcut, so I enabled it. But running like that, the command would run - both from the command prompt and from python but the passedText would not show up.
I followed the suggestion of turning the administrator option off, and the passedText started showing up provided the string was escaped as shown in the documentation:
VoiceAttack.exe -command test -passedText "\"text here\""
Then I tested it wiith the Run as administrator option enabled on the shortcut, and it seems to continue to work.
In my python, I do need to escape the quotes for the string similarly and this is what is working for me now:
va_binary = r"C:\Program Files (x86)\VoiceAttack\VoiceAttack.exe"
def test(data):
cmd_test = "test"
prm_test = "\"asdf\""
run_command_test(cmd_test, prm_test)
return
def run_command_test(command_string, param_string):
va_cmd = [settings["va_binary"], "-command", command_string, "-passedText", param_string]
subprocess.call(va_cmd, shell=True)
log(2, str(va_cmd))
return
And indeed when I look at the log output showing all the values in va_cmd it shows the string as "asdf".