Passing a quoted string in the System.Execute 'dir' argument.

The Virtual Audio Mixer discussions and support...
Post Reply
Monotab
Posts: 2
Joined: Fri Jun 11, 2021 1:52 pm

Passing a quoted string in the System.Execute 'dir' argument.

Post by Monotab »

I've been using the following System.Execute command to successfully launch and join a regular ZOOM call using a Macro Button (confno and pwd obviously anonymised):

System.Execute("%windir%\system32\cmd.exe","%temp%","/C %APPDATA%\Zoom\bin\Zoom.exe %' --url=zoommtg://zoom.us/join?action=join&confno=1111111111&pwd=AAAAAAAA%'");

It works, but I think there could be a more elegant solution that doesn't rely on using the ‘CMD’ shell. I tried the following approach:

System.Execute("%APPDATA%\Zoom\bin\Zoom.exe", "%temp%", " --url=zoommtg://zoom.us/join?action=join&confno=&pwd=1111111111&pwd=AAAAAAAA");

Although it successfully launches ZOOM, the conference number and password aren't recognised by ZOOM and it doesn't join the call. I think it might be that ZOOM needs to have the string enclosed in quotes but the System.Execute strips the quotes from the ‘dir’ string? I’ve tried using the percent+quote (%’) and percent+ampersand (%&) in various combinations, but without success.

I can’t find an answer in the forum, so I am asking for suggestions?
xcasxcursex
Posts: 156
Joined: Tue Feb 18, 2020 12:04 am

Re: Passing a quoted string in the System.Execute 'dir' argument.

Post by xcasxcursex »

Yes, the string needs to be in apostrophes (this is specific to zoom) and no, they are not there, so you're on the right track.

The term you're after here is "escape character", but I don't think you actually need one since the characters aren't stripped, they're just missing.

Did you try it straight up with the quotes like so:

System.Execute("%APPDATA%\Zoom\bin\Zoom.exe", "%temp%", "'--url=zoommtg://zoom.us/join?action=join&confno=&pwd=1111111111&pwd=AAAAAAAA'");

Note that I have "'... '" and you have "...". Those apostrophes from the working command aren't in your nonworking one. It's not that they're stripped, they just aren't there.
Vincent Burel
Site Admin
Posts: 1581
Joined: Sun Jan 17, 2010 12:01 pm

Re: Passing a quoted string in the System.Execute 'dir' argument.

Post by Vincent Burel »

% + simple quote will be replaced by double quote

%' = "

and %% = %
Monotab
Posts: 2
Joined: Fri Jun 11, 2021 1:52 pm

Re: Passing a quoted string in the System.Execute 'dir' argument.

Post by Monotab »

Thanks guys. I have played around a little more after your suggestions and got it working. The exact format of the call I used is:

System.Execute("%APPDATA%\Zoom\bin\Zoom.exe", "%temp%", "' --url=zoommtg://zoom.us/join?action=join&confno=111111111&pwd=AAAAAA '");

The interesting thing is that I had to put a space between the end of the password and the quotes ->AAAAAA '"<- to make ZOOM recognise the password.

Awesome. I can now launch my remote guitar sessions using Macro Buttons and don't have to fiddle with passwords.
Post Reply