WslLaunchInteractive function (wslapi.h)
Launches an interactive Windows Subsystem for Linux (WSL) process in the context of a particular distribution.This differs from WslLaunch in that the end user will be able to interact with the newly-created process.
HRESULT WslLaunchInteractive( [in] PCWSTR distributionName, [in, optional] PCWSTR command, [in] BOOL useCurrentWorkingDirectory, [out] DWORD *exitCode );
Unique name representing a distribution (for example, "Fabrikam.Distro.10.01").
[in, optional] command
Command to execute. If no command is supplied, launches the default shell.
Governs whether or not the launched process should inherit the calling process's working directory. If FALSE, the process is started in the WSL default user's home directory ("~").
Receives the exit code of the process after it exits.
Returns S_OK on success, or a failing HRESULT otherwise.