Skip to content

workspaces: shell:appsfolder launch does not support the command line #39433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/modules/Workspaces/WorkspacesLauncher/AppLauncher.cpp
Original file line number Diff line number Diff line change
@@ -25,6 +25,7 @@ namespace AppLauncher
const std::wstring ChromeFilename = L"chrome.exe";
const std::wstring ChromePwaFilename = L"chrome_proxy.exe";
const std::wstring PwaCommandLineAddition = L"--profile-directory=Default --app-id=";
const std::wstring SteamProtocolPrefix = L"steam:";
}

Result<SHELLEXECUTEINFO, std::wstring> LaunchApp(const std::wstring& appPath, const std::wstring& commandLineArgs, bool elevated)
@@ -134,12 +135,11 @@ namespace AppLauncher
}
}

// win32 app with appUserModelId:
// usage example: steam games
if (!launched && !app.appUserModelId.empty())
// protocol launch for steam
if (!launched && !app.appUserModelId.empty() && app.appUserModelId.contains(NonLocalizable::SteamProtocolPrefix))
{
Logger::trace(L"Launching {} as {}", app.name, app.appUserModelId);
auto res = LaunchApp(L"shell:AppsFolder\\" + app.appUserModelId, app.commandLineArgs, app.isElevated);
auto res = LaunchApp(app.appUserModelId, app.commandLineArgs, app.isElevated);
Copy link
Contributor

@yeelam-gordon yeelam-gordon May 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, if it launch with "shell:appFolder\" way, actually the comandLineArgs mean nothing since it doesn't support passing any app's args..

NOTE: I don't mean it need to be investigate or fix anything in current PR, I mean with this fix, it may, not sure if there must be, open a possibility to support "args" in case a particular steam://XXX support args as part of this URL.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense, will take a look afterwards

if (res.isOk())
{
launched = true;
Loading
Oops, something went wrong.