How can I make my environment variable (set in batch file) visible in application executed right after setting this envvar?
Here's the scenario that I use:
In my external script (not quite important here) I create Windows shortcuts to jpg files, with the target looking like:
%MYPHOTODRIVE% should contain just a current drive letter.
I start IrfanView using the following BAT script (script is located in the same directory as all the .lnk files):
set MYPHOTOSDRIVE=%cd:~0,2% "c:\Program Files\IrfanView\i_view32.exe" "i:\private\photolinks\photo001.lnk" "c:\Program Files\IrfanView\i_view32.exe" /slideshow="%cd%"
The problem is that neither the single image, nor a slideshow (for the second call to IrfanView) is executed properly.
Shouldn't this "MYPHOTODRIVE" variable be expanded to a proper value upon Irfan execution? Doesn't it get the same environment as the parent script?