mirror of
https://github.com/microsoft/PowerToys
synced 2025-08-31 14:35:18 +00:00
workspaces: shell:appsfolder launch does not support the command line (#39433)
shell:appsfolder launch does not respect the command line
This commit is contained in:
@@ -25,6 +25,7 @@ namespace AppLauncher
|
|||||||
const std::wstring ChromeFilename = L"chrome.exe";
|
const std::wstring ChromeFilename = L"chrome.exe";
|
||||||
const std::wstring ChromePwaFilename = L"chrome_proxy.exe";
|
const std::wstring ChromePwaFilename = L"chrome_proxy.exe";
|
||||||
const std::wstring PwaCommandLineAddition = L"--profile-directory=Default --app-id=";
|
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)
|
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:
|
// protocol launch for steam
|
||||||
// usage example: steam games
|
if (!launched && !app.appUserModelId.empty() && app.appUserModelId.contains(NonLocalizable::SteamProtocolPrefix))
|
||||||
if (!launched && !app.appUserModelId.empty())
|
|
||||||
{
|
{
|
||||||
Logger::trace(L"Launching {} as {}", app.name, app.appUserModelId);
|
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);
|
||||||
if (res.isOk())
|
if (res.isOk())
|
||||||
{
|
{
|
||||||
launched = true;
|
launched = true;
|
||||||
|
Reference in New Issue
Block a user