Skip to content
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

Support for PowerShell cmdlets in admin mode #2642

Merged
merged 52 commits into from
Dec 3, 2022

Conversation

ryfu-msft
Copy link
Contributor

@ryfu-msft ryfu-msft commented Oct 26, 2022

Related to: #221

Initial Proof of Concept: master...JohnMcPMS:winget-cli:ps-admin

This PR adds support for calling an elevated PowerShell and having elevation flow through the installer.

Changes:

  • Changes Activation path in PS based on elevation, blocks if running as SYSTEM
  • Targets test CLSIDs and devServer by default
  • Git ignores files generated from IDL
  • If create instance fails, launches server using CreateProcess
  • Terminates server if another server is already present
  • Requires a secure connection via RPC flags and security descriptor.
  • Adds E2E test for PowerShell cmdlets. Build pipeline runs these in admin mode so this feature should have sufficient test coverage.
  • Exposes an export in WindowsPackageManager project to allow for the COM server to call for logging WIL results.
Microsoft Reviewers: Open in CodeFlow

@ryfu-msft ryfu-msft requested a review from a team as a code owner October 26, 2022 21:02
Copy link
Member

@JohnMcPMS JohnMcPMS left a comment

Choose a reason for hiding this comment

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

src/WinGetServer/WinGetServer.idl is showing as binary; it probably needs some BOM added or removed to get it to show as text here.

src/UndockedRegFreeWinRT/UndockedRegFreeWinRT/catalog.cpp Outdated Show resolved Hide resolved
src/WinGetServer/WinMain.cpp Outdated Show resolved Hide resolved
src/WinGetServer/WinMain.cpp Outdated Show resolved Hide resolved
src/WinGetServer/WinMain.cpp Outdated Show resolved Hide resolved
src/WinGetServer/WinMain.cpp Outdated Show resolved Hide resolved
src/WinGetServer/WinMain.cpp Outdated Show resolved Hide resolved
@ghost ghost added the Needs-Author-Feedback Issue needs attention from issue or PR author label Oct 27, 2022
@ghost ghost removed the Needs-Author-Feedback Issue needs attention from issue or PR author label Nov 2, 2022
@yao-msft
Copy link
Contributor

yao-msft commented Nov 4, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines failed to run 1 pipeline(s).

@ryfu-msft
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines failed to run 1 pipeline(s).

@ryfu-msft
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines failed to run 1 pipeline(s).

@yao-msft
Copy link
Contributor

yao-msft commented Nov 4, 2022

/azure-pipelines.yml (Line: 174, Col: 12): Unexpected value ''

@msftrubengu
Copy link
Contributor

<ProjectReference Include="..\..\UndockedRegFreeWinRT\UndockedRegFreeWinRT\UndockedRegFreeWinRT.vcxproj">

Don't you need to update this?


Refers to: src/PowerShell/Microsoft.WinGet.Client/Microsoft.WinGet.Client.csproj:41 in 190a6b9. [](commit_id = 190a6b9, deletion_comment = False)

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@ryfu-msft ryfu-msft merged commit 8e30e7b into microsoft:master Dec 3, 2022
@ryfu-msft ryfu-msft deleted the powerShellAdmin branch December 3, 2022 02:03
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.

4 participants