Description
Description
In Windows shortcuts I can use, for example, "%USERPROFILE%" (a specification of an environment variable, supported in cmd.exe/batch files) in the shortcut fields "Target:" and "Start in:"
But when executing such a shortcut via double click in Files, one can see that the process gets launched with the environment specification as is, instead of evaluated. From Process Explorer:
The top entry is when launched from File Explorer.
The bottom entry is when launched from Files. Note the command line, which for the bottom entry still contains the environment variable placeholder.
I suspect that expansion of environment variable specifications may be functionality of the underlying Win32 (or so) API used.
When launching the shortcut in cmd.exe, the expansion happens. One could suspect that cmd.exe has extra functionality to achieve this however.
When using Python, and executes the shortcut via os.system(), the expand happens, too.
Steps To Reproduce
- Create a shortcut and in its properties set/change its "Target:" field to:
%WINDIR%\notepad.exe
- Double click the shortcut in File Explorer.
Expected and actual result: Notepad(.exe) launches.
- Double lick the shortcut in Files.
Expected result: Notepad.exe launches.
Actual result: Notepad does not launch.
Requirements
Notepad.exe gets launched as expected.
Files Version
3.1.1
Windows Version
10.0.22631.2861
Log File
Metadata
Metadata
Assignees
Type
Projects
Status