Author Topic: Environment variable in path  (Read 239 times)

Folinos

  • Posts: 37
Environment variable in path
« on: 25 Dec '19 - 10:50 »
I'd like to use ambient variable in path f.e. in Encoders command-line.
Also i would preserve current directory for options also when i load other file from gui.
« Last Edit: 27 Dec '19 - 18:07 by Folinos »

Ian @ un4seen

  • Administrator
  • Posts: 22305
Re: Ambient variable in path
« Reply #1 on: 27 Dec '19 - 18:02 »
I'm not sure what you mean by "ambient variable". Can you give an example to clarify that?

Folinos

  • Posts: 37
Re: Ambient variable in path
« Reply #2 on: 27 Dec '19 - 18:07 »
GetEnvironmentVariable:
%ProgramFiles%
%TEMP%
%LOCALAPPDATA%
...

Ian @ un4seen

  • Administrator
  • Posts: 22305
Re: Environment variable in path
« Reply #3 on: 30 Dec '19 - 14:02 »
OK. I'm not really sure where they would be useful in XMPlay. Were you thinking of using them in paths to encoder EXEs? The path isn't needed if you put the encoder EXEs in the same directory as the XMPLAY.EXE file. Or you can put the encoders in a sub-directory and include just that (not the full path) in the command-lines. Let me know if you had something else in mind.

Folinos

  • Posts: 37
Re: Environment variable in path
« Reply #4 on: 19 Jan '20 - 10:24 »
I have more computer with system file as lame.exe in custom folder.
This folder change location but i normalize with envinronment variable.
f.e.
one pc:
c:\onepc\lame.exe
set myCustomFolder=c:\onepc

two pc:
c:\twopc\lame.exe
set myCustomFolder=c:\twopc

I can astract with:
%myCustomFolder%\lame.exe

without duplicate files.
it would seem easy to implement with ExpandEnvironmentStrings.