'Parent Process Directory not recognized by the Icon and Background Image fields in Windows Terminal

Windows Terminal version

1.12.10732.0

Windows build number

19043.1645

Issue

Forgive me if this has been addressed already somewhere else, but I realized that when Use parent process directory is checked, Command line is able to run testrun.bat which is located in the parent process directory but Icon is unable to access test_icon.ico which is also located in the parent process directory.

Is there a reference (such as %USERPROFILE% is to the home folder) to point to the parent process directory so that I can access the test_icon.ico file? Something along the lines of %PARENTDIRECTORY%\test_icon.ico or otherwise how do I deal with this?

The intent here is to have wt dynamically locate whatever test_icon.ico file that is present in the current parent process directory for the icon or background image settings.

image

Expected Behavior

test_icon.ico in the Icon field, Loads the .ico file as the icon. Same goes for the background image in the Appearance tab.

Actual Behavior

I get the following error message below...

image



Solution 1:[1]

Found a solution in this article

In the Icon and Background fields, you can reference your files relative to your current working directory:

%__CD__%\relative_path_to_icon_file. In my case it would be %__CD__%\graphics\app_bckgnd.jpg.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 BJonas88