Variable will not show up properly when using cmd.exe

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
criscocube
Newbie
Posts: 5
Joined: Fri Sep 16, 2016 11:55 am

Variable will not show up properly when using cmd.exe

Post by criscocube » Sat Mar 24, 2018 10:50 am

Hi all,

I dont get it because it works in some case but not others... here is an example:

Using the two variables A=blabla123 and ID=yeayea000

Code: Select all

Send>"C:\Program Files\ProgramFiles%\Sandboxie\Start.exe" /box:%A% "C:\Program Files\Mozilla Firefox\firefox.exe" http:urlurlbla.com/%ID%/
This code spits out %A% instead of the variable, as does

Code: Select all

Run>cmd.exe /C "C:\Program Files\ProgramFiles%\Sandboxie\Start.exe" /box:%A% "C:\Program Files\Mozilla Firefox\firefox.exe" http://url.com/%ID%
But if I use

Code: Select all

Send>%A%
or

Code: Select all

Send>%ID%
the variable is outputted correctly...

what am i missing here?

Thanks!

User avatar
Grovkillen
Automation Wizard
Posts: 1132
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: Variable will not show up properly when using cmd.exe

Post by Grovkillen » Sat Mar 24, 2018 4:55 pm

I do stuff like that on two steps:

Code: Select all

Let>CMD_LINE=cmd /C "C:\Program Files\ProgramFiles%\Sandboxie\Start.exe" /box:%A% "C:\Program Files\Mozilla Firefox\firefox.exe" http://url.com/%ID%
Run>CMD_LINE
Let>ME=%Script%

Running: 15.0.27
version history

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts