Skip to content

Process reparse points to Microsoft Store applications - #13481

Merged
Rob Holt (rjmholt) merged 2 commits into
PowerShell:masterfrom
iSazonov:is-store-app
Aug 27, 2020
Merged

Process reparse points to Microsoft Store applications#13481
Rob Holt (rjmholt) merged 2 commits into
PowerShell:masterfrom
iSazonov:is-store-app

Conversation

@iSazonov

@iSazonov Ilya (iSazonov) commented Aug 19, 2020

Copy link
Copy Markdown
Collaborator

PR Summary

Fix #9970

  • Add resolving a Store application path (that is a reparse point) to a real path.
    SHGetFileInfo() does not understand reparse points and returns 0 ("non exe or error") so we are trying to get a real path before.

  • Exclude Windows code from compilation on Unix.

  • Exclude second extra check if an app is Windows application or console application
    Add new properties (IsWindowsApplication/IsConsoleApplication) to NativeCommandProcessor to cache the check.
    Before the PR we did the check twice - (1) in redirection check, (2) in background check.

I tested this manually with C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\Skype.exe.

/cc Dustin L. Howett (@DHowett)

PR Context

PR Checklist

@iSazonov Ilya (iSazonov) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Aug 19, 2020
@ghost ghost added the Review - Needed The PR is being reviewed label Aug 26, 2020
@ghost

Copy link
Copy Markdown

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@rjmholt

Copy link
Copy Markdown
Collaborator

I'm afraid I don't know much about reparse points or the Microsoft Store. Requesting review from Steve Lee (@SteveL-MSFT), Andrew (@anmenaga) and Dongbo Wang (@daxian-dbw).

@ghost ghost removed the Review - Needed The PR is being reviewed label Aug 26, 2020
@DHowett

Copy link
Copy Markdown

This feels like the right solution to me, especially because we're already treating IO_REPARSE_TAG_APPEXECLINK as though it were a link already.

@rjmholt

Copy link
Copy Markdown
Collaborator

CI failures seem to be unrelated -- will see if there's a fix

Comment thread src/System.Management.Automation/namespaces/FileSystemProvider.cs Outdated
@iSazonov

Copy link
Copy Markdown
Collaborator Author

Rob Holt (@rjmholt) I rebased to pass CIs.

@rjmholt
Rob Holt (rjmholt) merged commit 4e2b6e9 into PowerShell:master Aug 27, 2020
@iSazonov
Ilya (iSazonov) deleted the is-store-app branch August 28, 2020 05:12
@iSazonov Ilya (iSazonov) added this to the 7.1.0-preview.7 milestone Aug 28, 2020
@ghost

Copy link
Copy Markdown

🎉v7.1.0-preview.7 has been released which incorporates this pull request.:tada:

Handy links:

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

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows Store applications incorrectly assumed to be console applications

4 participants