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: 289
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

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

Curious.

Cheers
John
You do not have the required permissions to view the files attached to this post.
Windows 11 Pro x64
XYplorer 28.30.0000 x64

highend
Posts: 14923
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: 289
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.30.0000 x64

admin
Site Admin
Posts: 66075
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