Skip to content

Process reparse points to Microsoft Store applications#13481

Merged
rjmholt merged 2 commits intoPowerShell:masterfrom
iSazonov:is-store-app
Aug 27, 2020
Merged

Process reparse points to Microsoft Store applications#13481
rjmholt merged 2 commits intoPowerShell:masterfrom
iSazonov:is-store-app

Conversation

@iSazonov
Copy link
Copy Markdown
Collaborator

@iSazonov iSazonov commented Aug 19, 2020

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 @DHowett

PR Context

PR Checklist

@iSazonov 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
@iSazonov iSazonov requested a review from anmenaga as a code owner August 19, 2020 12:10
@ghost ghost added the Review - Needed The PR is being reviewed label Aug 26, 2020
@ghost
Copy link
Copy Markdown

ghost commented Aug 26, 2020

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

rjmholt commented Aug 26, 2020

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

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

DHowett commented Aug 27, 2020

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

rjmholt commented Aug 27, 2020

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

@iSazonov
Copy link
Copy Markdown
Collaborator Author

@rjmholt I rebased to pass CIs.

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

ghost commented Sep 8, 2020

🎉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