Skip to content

fix: resolve Known Folder GUID paths before launching apps#110

Merged
Jeomon merged 1 commit intoCursorTouch:mainfrom
JezaChen:fix/resolve-known-folder-guid-path
Mar 16, 2026
Merged

fix: resolve Known Folder GUID paths before launching apps#110
Jeomon merged 1 commit intoCursorTouch:mainfrom
JezaChen:fix/resolve-known-folder-guid-path

Conversation

@JezaChen
Copy link
Contributor

Summary

  • Fix App tool failing to launch apps whose AppID uses a Known Folder GUID path (e.g. {1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\msinfo32.exe)
  • Add resolve_known_folder_guid_path() utility that calls SHGetKnownFolderPath to resolve GUID prefixes to real filesystem paths before passing them to Start-Process

Problem

When using the App tool in launch mode to start certain applications (e.g. System Information, Bandizip, ...), the following error occurs:

This command cannot be run due to the error: An error occurred trying to start process
'{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\msinfo32.exe' ...
image image image

On Windows, certain app entries may contain a path-like string prefixed with a Known Folder GUID, for example:

{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\msinfo32.exe

This value is not a normal filesystem path, so passing it directly to Start-Process will cause startup failures.

Solution

Resolve the GUID prefix via the Win32 SHGetKnownFolderPath API before invoking Start-Process. For example:

Before (raw AppID) After (resolved)
{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\msinfo32.exe C:\Windows\System32\msinfo32.exe

If the path does not match the {GUID}\... pattern or the GUID is unrecognised, the original value is returned unchanged, so existing behaviour is unaffected.

Start Menu shortcuts may use GUID-based paths (e.g.
{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\msinfo32.exe) that
Start-Process cannot handle directly. Resolve them via
SHGetKnownFolderPath before passing to PowerShell.
Copilot AI review requested due to automatic review settings March 16, 2026 14:11
@Jeomon Jeomon merged commit b587bbc into CursorTouch:main Mar 16, 2026
3 of 4 checks passed
@Jeomon
Copy link
Member

Jeomon commented Mar 16, 2026

gr8 work and thanks for pointing it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants