Environment variables not passing right through the bar.

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
krapet
Junior Member
Junior Member
Posts: 21
Joined: 2007-08-02, 06:39 UTC
Location: Czech

Environment variables not passing right through the bar.

Post by *krapet »

I would like to use system environment variables in button bar (to specify several different ini files for IrfanView).
When I put following text: /ini="%APPDATA%\IrfanView_2" into "Parameters" filed it is not passed correctly.

It is passed as: /ini="PPDATAIrfanView_2"

When I use the same in lnk file it works fine.

How to makes it working in Total Commander?
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

Because the parameters field is primary used to expand the internal parameter (e..g. %A is "Inserts the rest of the entered command line"), environment variables needs to be escaped (%% inserts the percent-sign)
-> /ini="%%APPDATA%%\IrfanView_2"
or simply add the parameter with environment variables to the command field.

Regards
Holger
krapet
Junior Member
Junior Member
Posts: 21
Joined: 2007-08-02, 06:39 UTC
Location: Czech

Environment variables not passing right through the bar.

Post by *krapet »

I tried this suggestion but it still not works as expected.

It produces: /ini="%APPDATA%\IrfanView_2"
while expected is: /ini="C:\Users\Me\AppData\Roaming\IrfanView_2"

When I put content of the variable directly I need to modify it for each user. So it is not acceptable solution.
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

It produces: /ini="%APPDATA%\IrfanView_2"
should be no problem if the called application would expand environment variable by its own.

Tried this?
HolgerK wrote:or simply add the parameter with environment variables to the command field.
Regards
Holger
Post Reply