-
Notifications
You must be signed in to change notification settings - Fork 16
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
[Bug]: Issues when running as local system #15
Comments
Dealing with paths is problematic but not insurmountable. I don't think winget was ever designed with the idea that someone would run under the system context. |
Ah, I didn't know if the module was supposed to handle that or not. I don't remember who pointed me to this repository, but someone told me this should work as local system. As far as Winget not being designed to run in the system context I wonder how Microsoft plans to deal with this when they retire the Windows Store next year. I thought Winget was the way forward, but all deployment tools operate in the system context. Here's a function to get the path. I don't know how to use it with your module though.
|
I am using a function to get the path. I'm facing an additional hurdle in getting the path when using non-US cultures. This is definitely a nuisance problem. |
Gotcha, FWIW I am on US English devices. |
The C:\Program not found issue I was able to fix by modifying Get-WingetPath.ps1 line 10: |
Describe the problem
I'm getting errors when trying to use this in local system context.
PS C:> get-WGReleaseNote
Name : Windows Package Manager 1.3.2691
Version : v1.3.2691
Published : 10/4/2022 6:41:33 PM
Prerelease : False
Notes : This is the second stable release of the Windows Package Manager 1.3. This release is just for the sake of transparency for Windows Package Manager users. This ensures that the GitHub release is aligned with any changes related to AppInstaller. The changes associated with this release only affect AppInstaller. No additional features or bug fixes related to winget were included.
Experimental features are disabled in this release.
Link : https://github.com/microsoft/winget-cli/releases/tag/v1.3.2691
PS C:> whoami
nt authority\system
PS C:> Get-WGPackage -id github.cli
C:\Program : The term 'C:\Program' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
PS C:> Install-Winget -Verbose
VERBOSE: [12:17:20.8899057] Starting Install-WinGet
VERBOSE: Installing Desktop App requirement
VERBOSE: GET with 0-byte payload
VERBOSE: received 6638831-byte response of content type application/octet-stream
Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF9, Install failed. Please contact your software vendor.
(Exception from HRESULT: 0x80073CF9)
Deployment Add operation rejected on package Microsoft.VCLibs.140.00.UWPDesktop_14.0.30704.0_x64__8wekyb3d8bbwe from:
Microsoft.VCLibs.x64.14.00.Desktop.appx install request because the Local System account is not allowed to perform
this operation.
NOTE: For additional information, look for [ActivityId] 8c45cda6-dc00-0002-b98e-478c00dcd801 in the Event Log or use
the command line Get-AppPackageLog -ActivityID 8c45cda6-dc00-0002-b98e-478c00dcd801
At C:\Program Files\WindowsPowerShell\Modules\WingetTools\1.6.0\functions\Install-Winget.ps1:31 char:17
PS C:>
Expectation
No response
Additional Information
No response
PowerShell version
5.1
Platform
No response
Additional Checks
The text was updated successfully, but these errors were encountered: