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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
6307854
save work
Oct 20, 2022
00c91f1
Merge branch 'master' of https://github.com/ryfu-msft/winget-cli into…
Oct 20, 2022
ccaa1dc
save work
Oct 21, 2022
e3dda96
save work
Oct 22, 2022
4d732c2
add E2E tests for powershell module
Oct 26, 2022
0febd74
revert unnecessary changes
Oct 26, 2022
0a11caa
fix build issues
Oct 26, 2022
6813160
try again
Oct 26, 2022
f1d7b45
address PR comments
Nov 2, 2022
74414ae
fix build issues
Nov 3, 2022
71633e0
set execution policy
Nov 4, 2022
adc0c05
try again
Nov 4, 2022
bd96353
fix spacing
Nov 4, 2022
04524b6
run module in powershell task
Nov 4, 2022
0b68135
install test package
Nov 4, 2022
7626067
enable verbose logging
Nov 4, 2022
a7a8c78
fix x86 and add error code to output
Nov 7, 2022
9fe098e
fix path
Nov 7, 2022
b9d7aff
copy winrt act properly
Nov 7, 2022
ddb488b
fix x86 build output
Nov 8, 2022
987fad6
add com tracing
Nov 8, 2022
f0836e6
continue on error
Nov 9, 2022
9590eae
comment out e2e tests
Nov 9, 2022
ecd46bd
always run task
Nov 9, 2022
d1e55e7
publish appx package
Nov 9, 2022
708e082
Enable logging for com
Nov 14, 2022
0809143
try different order
Nov 14, 2022
1ca4064
remove explicity fail error
Nov 14, 2022
5075f5b
try again
Nov 14, 2022
8a9b956
revert all changes
Nov 14, 2022
8f68d4d
uncomment tests
Nov 14, 2022
cf5a0ef
remove teardown form powershell module test
Nov 14, 2022
b149685
remove unnecessary changes
Nov 14, 2022
eabc286
fix powershell module e2e test
Nov 15, 2022
d4c466f
separate powershell tests
Nov 15, 2022
38a20af
Fix E2E tests
Nov 15, 2022
6918fb9
rejoin powershell tests
Nov 15, 2022
3ff22d1
fix binskim
Nov 16, 2022
b66ebb7
Address PR comments
Nov 22, 2022
e1aeb9e
resolve merge conflicts
Nov 22, 2022
6f4885b
fix path in project file
Nov 22, 2022
3c19802
respond to PR feedback
Nov 28, 2022
9957cd8
fix build dependencies
Nov 28, 2022
190a6b9
fix manual reset event
Nov 30, 2022
a305bab
fix build warnings and errors
Dec 1, 2022
5a9d0a2
revert flags parameter
Dec 2, 2022
ffef20d
Merge branch 'master' of https://github.com/ryfu-msft/winget-cli into…
Dec 2, 2022
7b1362a
fix spelling
Dec 3, 2022
9d587c8
more spelling
Dec 3, 2022
4ff0887
even more spelling
Dec 3, 2022
0d4edb0
remove Reset event
Dec 3, 2022
bb04705
fix line spacing
Dec 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ aspnet
authn
authz
autocomplete
AUTOLISTEN
auxdata
azureedge
backend
Expand Down Expand Up @@ -202,6 +203,7 @@ hcertstore
HCRYPTMSG
hfile
HGLOBAL
HGlobal
HIDECANCEL
hinternet
HKCU
Expand All @@ -228,6 +230,7 @@ IDX
IFACEMETHOD
ifdef
ifndef
ifspec
ifstream
IIS
impl
Expand All @@ -246,9 +249,11 @@ INSTALLPATH
INSTALLUILEVEL
interop
INVALIDARG
INVALIDSID
iomanip
iostream
IPortable
ipmo
ISAPPROVEDFOROUTPUT
isspace
istream
Expand Down Expand Up @@ -311,13 +316,16 @@ msixmgr
msixsdk
msixsdkx
msixtest
MSHCTX
MSHLFLAGS
msrc
Multifile
Multimatch
mutex
mutexes
namespace
namespaces
ncacn
Nelon
netcoreapp
netstandard
Expand Down Expand Up @@ -395,18 +403,23 @@ preindexed
prepareforpackaging
PRIMARYKEY
prioritization
processthreadsapi
PRODUCTNAME
PRODUCTVERSION
PROGRAMFILES
PROGRESSONLY
promptrestart
PROPERTYDUMP
PROTSEQ
Protseq
psz
PTOKEN
ptr
publiccontainer
PUCHAR
PVOID
pwa
pwsh
QCol
RAII
rclsid
Expand Down Expand Up @@ -438,6 +451,7 @@ RESTSOURCE
resw
resx
rethrowing
REQS
roadmap
robuffer
rowcount
Expand Down Expand Up @@ -473,7 +487,9 @@ SHELLEXEC
SHELLEXECUTEINFO
SHELLEXECUTEINFOA
SHELLEXECUTEINFOW
shlobj
Shlwapi
shtypes
signtool
silentwithprogress
simplesave
Expand All @@ -497,6 +513,7 @@ src
srwlock
sscanf
sstream
STARTUPINFO
STATEACTION
STATFLAG
STATSTG
Expand Down Expand Up @@ -589,6 +606,7 @@ UIA
UIF
uint
Uknown
ULARGE
ulong
ULONGLONG
uncomment
Expand All @@ -598,6 +616,7 @@ unicode
UNICODESTRING
uninstall
uninstalling
Unmarshal
Unregister
Unregisters
untimes
Expand Down Expand Up @@ -669,6 +688,7 @@ WStr
wstring
wstringstream
WTD
wtypesbase
www
xamarin
xaml
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -329,3 +329,8 @@ ASALocalRun/

# MFractors (Xamarin productivity tool) working folder
.mfractor/

# Generated files from WinGetServer.idl
**/WinGetServer/WinGetServer.h
**/WinGetServer/WinGetServer_c.c
**/WinGetServer/WinGetServer_s.c
25 changes: 13 additions & 12 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,6 @@ jobs:
CleanTargetFolder: false
OverWrite: true

- template: templates/e2e-test.template.yml
parameters:
title: "E2E Tests Packaged"
isPackaged: true
filter: "TestCategory!=InProcess&TestCategory!=OutOfProcess"

- task: PowerShell@2
displayName: 'Set program files directory'
inputs:
Expand All @@ -238,12 +232,6 @@ jobs:
TargetFolder: '$(platformProgramFiles)\dotnet'
Contents: resources.pri

- template: templates/e2e-test.template.yml
parameters:
title: "COM API E2E Tests (In-process)"
isPackaged: false
filter: "TestCategory=InProcess"

# Winmd accessed by test runner process (dotnet.exe)
- task: CopyFiles@2
displayName: 'Copy winmd to dotnet directory'
Expand All @@ -260,6 +248,18 @@ jobs:
TargetFolder: 'src\AppInstallerCLIPackage\bin\$(buildPlatform)\$(buildConfiguration)'
Contents: Microsoft.Management.Deployment.winmd

- template: templates/e2e-test.template.yml
parameters:
title: "E2E Tests Packaged"
isPackaged: true
filter: "TestCategory!=InProcess&TestCategory!=OutOfProcess"

- template: templates/e2e-test.template.yml
parameters:
title: "COM API E2E Tests (In-process)"
isPackaged: false
filter: "TestCategory=InProcess"

- template: templates/e2e-test.template.yml
parameters:
title: "COM API E2E Tests (Out-of-process)"
Expand Down Expand Up @@ -305,6 +305,7 @@ jobs:
inputs:
filePath: 'src\PowerShell\Microsoft.WinGet.Client\Copy-PlatformBinaries.ps1'
arguments: '-Platform $(buildPlatform) -Configuration $(buildConfiguration) -OutDir $(artifactsDir)\PowerShell'
condition: always()

- task: PublishPipelineArtifact@1
displayName: Publish Pipeline Artifacts
Expand Down
7 changes: 5 additions & 2 deletions src/AppInstallerCLI.sln
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Management.Deployment.Projection", "Microsoft.Management.Deployment.Projection\Microsoft.Management.Deployment.Projection.csproj", "{0B104762-5CD8-47EE-A904-71C1C3F84DCD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UndockedRegFreeWinRT", "Xlang\UndockedRegFreeWinRT\src\UndockedRegFreeWinRT\UndockedRegFreeWinRT\UndockedRegFreeWinRT.vcxproj", "{31ED69A8-5310-45A9-953F-56C351D2C3E1}"
ProjectSection(ProjectDependencies) = postProject
{2B00D362-AC92-41F3-A8D2-5B1599BDCA01} = {2B00D362-AC92-41F3-A8D2-5B1599BDCA01}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Detours", "Xlang\UndockedRegFreeWinRT\src\UndockedRegFreeWinRT\detours\detours.vcxproj", "{787EC629-C0FB-4BA9-9746-4A82CD06B73E}"
EndProject
Expand Down Expand Up @@ -992,8 +995,8 @@ Global
{31ED69A8-5310-45A9-953F-56C351D2C3E1}.Release|ARM64.ActiveCfg = Debug|Win32
{31ED69A8-5310-45A9-953F-56C351D2C3E1}.Release|x64.ActiveCfg = Release|x64
{31ED69A8-5310-45A9-953F-56C351D2C3E1}.Release|x64.Build.0 = Release|x64
{31ED69A8-5310-45A9-953F-56C351D2C3E1}.Release|x86.ActiveCfg = Debug|Win32
{31ED69A8-5310-45A9-953F-56C351D2C3E1}.Release|x86.Build.0 = Debug|Win32
{31ED69A8-5310-45A9-953F-56C351D2C3E1}.Release|x86.ActiveCfg = Release|Win32
{31ED69A8-5310-45A9-953F-56C351D2C3E1}.Release|x86.Build.0 = Release|Win32
{31ED69A8-5310-45A9-953F-56C351D2C3E1}.TestRelease|Any CPU.ActiveCfg = Debug|Win32
{31ED69A8-5310-45A9-953F-56C351D2C3E1}.TestRelease|Any CPU.Build.0 = Debug|Win32
{31ED69A8-5310-45A9-953F-56C351D2C3E1}.TestRelease|ARM.ActiveCfg = Debug|Win32
Expand Down
11 changes: 11 additions & 0 deletions src/AppInstallerCLIE2ETests/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public class Constants
public const string MsiInstallerPathParameter = "MsiTestInstallerPath";
public const string MsixInstallerPathParameter = "MsixTestInstallerPath";
public const string PackageCertificatePathParameter = "PackageCertificatePath";
public const string PowerShellModulePathParameter = "PowerShellModulePath";
public const string AppInstallerTestCert = "AppInstallerTest.cer";
public const string AppInstallerTestCertThumbprint = "d03e7a688b388b1edde8476a627531c49db88017";

Expand Down Expand Up @@ -74,6 +75,16 @@ public class Constants
public const string TestExeUninstallerFileName = "UninstallTestExe.bat";
public const string TestExeUninstalledFileName = "TestExeUninstalled.txt";

// PowerShell Cmdlets
public const string FindCmdlet = "Find-WinGetPackage";
public const string GetCmdlet = "Get-WinGetPackage";
public const string GetSourceCmdlet = "Get-WinGetSource";
public const string InstallCmdlet = "Install-WinGetPackage";
public const string UninstallCmdlet = "Uninstall-WinGetPackage";
public const string UpdateCmdlet = "Update-WinGetPackage";

public const string WindowsPackageManagerServer = "WindowsPackageManagerServer";

// Locations
public const string LocalAppData = "LocalAppData";

Expand Down
Loading