Environment variables not resolved in the run command

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
JohnM
Posts: 273
Joined: 08 Jun 2006 11:59
Location: Windows 11 Pro @100%

Environment variables not resolved in the run command

Post by JohnM »

Hi all,

Does anyone know why the run command does not resolve environment variables?

For example:
Run command.PNG
Run command.PNG (22.25 KiB) Viewed 523 times

Changing "%PROGRAMFILES%" to "C:\Program Files" works fine.

Curious.

Cheers
John
Windows 11 Pro x64
XYplorer 28.80.0703 x64 beta

highend
Posts: 14586
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Environment variables not resolved in the run command

Post by highend »

Single quotes = No variable resolved^^
One of my scripts helped you out? Please donate via Paypal

JohnM
Posts: 273
Joined: 08 Jun 2006 11:59
Location: Windows 11 Pro @100%

Re: Environment variables not resolved in the run command

Post by JohnM »

Ahh I get it thanks. :tup:

Interesting that the same does not apply to openwith. :eh:
For instance this works:

Code: Select all

openwith '"%DATA_DRIVE%\msys64\usr\bin\bash.exe" "%PROGRAMFILES%\bin\media_info.sh" -P -d"<curpath>"', s;
Windows 11 Pro x64
XYplorer 28.80.0703 x64 beta

admin
Site Admin
Posts: 65024
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Environment variables not resolved in the run command

Post by admin »

Yep, there's an inconsistency. I could fix it but that would probably break scripts.

Post Reply