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

Conversation

vanzue
Copy link
Contributor

@vanzue vanzue commented May 15, 2025

Fix #39427

Summary of the Pull Request

Fix a regression when supporting steam games launch in workspaces by this PR #38380
Try to launch steam game with shell:\appsfolder/appusermodelid
image

  • When an app has appusermodelid, it will fall to shell:appsfolder + \appusermodelid, while this launch does not support command line. So command line is broken

When doing release check, use terminal as the "command line testing app", that works fine, so missed this one.

This pr restrict the scope of specific launch case for steam games

PR Checklist

  • Closes: #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

Locally verified for edge and visual studio, and make sure steam games still work
#39427

@vanzue vanzue changed the title shell:appsfolder launch does not respect the command line workspaces: shell:appsfolder launch does not respect the command line May 15, 2025
@vanzue vanzue changed the title workspaces: shell:appsfolder launch does not respect the command line workspaces: shell:appsfolder launch does not support the command line May 15, 2025
@vanzue
Copy link
Contributor Author

vanzue commented May 16, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@yeelam-gordon yeelam-gordon left a comment

Choose a reason for hiding this comment

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

Looks good.

{
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

@yeelam-gordon yeelam-gordon added the Product-Workspaces Refers to the Workspaces utility label May 16, 2025
@yeelam-gordon yeelam-gordon added this to the PowerToys 0.91 milestone May 16, 2025
@yeelam-gordon yeelam-gordon requested a review from Copilot May 16, 2025 13:46
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a regression in launching Steam games by restricting the scope for shell:appsfolder launches when command line arguments are not supported. Key changes include introducing a Steam protocol prefix constant and modifying the launch logic for apps with an appUserModelId.

  • Added a new constant for Steam protocol detection.
  • Updated the launch condition and logic to directly launch Steam games without prepending "shell:AppsFolder\".
Comments suppressed due to low confidence (1)

src/modules/Workspaces/WorkspacesLauncher/AppLauncher.cpp:139

  • There is an inconsistency in referencing the Steam protocol prefix. A new constant 'SteamProtocolPrefix' was introduced, yet this line refers to 'NonLocalizable::SteamProtocolPrefix'. Consider updating the reference to use the newly declared constant.
if (!launched && !app.appUserModelId.empty() && app.appUserModelId.contains(NonLocalizable::SteamProtocolPrefix))

@vanzue
Copy link
Contributor Author

vanzue commented May 17, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vanzue vanzue merged commit 12e23e2 into main May 19, 2025
16 checks passed
yeelam-gordon pushed a commit that referenced this pull request May 19, 2025
…#39433)

shell:appsfolder launch does not respect the command line
sadirano pushed a commit to sadirano/PowerToys that referenced this pull request Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product-Workspaces Refers to the Workspaces utility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI parameter does not work when running workspace
2 participants