[软件服务]windows ltsc iot 上面安装winget

date
Nov 3, 2024
slug
newsoftware-win-ltsc-iot-winget
status
Published
summary
新软件-
tags
software
service
type
Post
URL
 

Summary

安装过程

# https://github.com/microsoft/winget-cli/releases

   cd "folder-to-downloaded-files"
   Add-AppxPackage -Path Microsoft.VCLibs.arm64.14.00.Desktop.appx
   Stop-Process -Name SecHealthUI -Force
   Add-AppxPackage -Path Microsoft.UI.Xaml.2.8.appx
   Add-AppxPackage -Path Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle
   Add-AppxProvisionedPackage -Online -PackagePath Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -LicensePath 0a769c4da0ae4747ba4ab2f173709ced_License1.xml
   
notion image
notion image
notion image

截图

notion image

Raw





Skip to main content
Microsoft Ignite
Nov 1922, 2024

Join us this November to explore AI innovations, level up your skillset, and expand your network.

Learn
Sign in
Windows IoT
Search
Filter by title
Windows IoT Enterprise Overview
Release History
Prepare your lab environment
Customize a reference device
Sysprep, capture and deploy
Overview
Update installation media
Install Apps with WinGet
Volume License Deployment
Frequently asked questions
End-User License Agreement
Windows IoT Distributors
Code Samples
Feedback
Contact us
Learn  Windows  Windows for IoT  Windows IoT Enterprise 
Using WinGet to Install Apps on Windows IoT Enterprise
Article
05/09/2024
3 contributors
Applies to:
✅ Windows 11, ✅ Windows 10
In this article
Download WinGet
Install WinGet Client
Install Applications with WinGet
More Resources
The WinGet command line tool enables users to discover, install, upgrade, remove and configure applications on Windows 10 and Windows 11 devices. This tool is the client interface to the Windows Package Manager service.

In this tutorial, you learn how to install and utilize WinGet on Windows IoT Enterprise. This guide is useful for Windows IoT Enterprise LTSC versions as they don't support the Microsoft Store application itself, which is commonly used to install WinGet. The documentation is all tested on Windows 10 IoT Enterprise LTSC 2021.

Download WinGet
Download WinGet bundle files from WinGet CLI Repo Releases.

Choose the latest version that isn't "Prerelease" (It should have the Latest tag.)

In my case, this version is version 1.4.10173
Release screenshot

Download the msixbundle file and the License1.xml file.

Download the VCLibs Desktop framework package associated with your processor architecture.

For ARM64 architecture, download Microsoft.VCLibs.arm64.14.00.Desktop.appx

For x64 architecture, download Microsoft.VCLibs.x64.14.00.Desktop.appx

For more information, see How to install and update Desktop framework packages

WinGet CLI has a dependency on Microsoft.UI.Xaml.2.8.

Download the Microsoft.UI.Xaml.2.8 NuGet package from Microsoft UI NuGet Org. The download link is located on the right side at Download Package.

Change the file extension from .nupkg to .zip. To change the file extension, Open Command Prompt, navigate to the directory where the nupkg file was downloaded and run the following command to rename the file:

Windows Command Prompt

Copy
ren Microsoft.UI.Xaml.2.8.6.nupkg Microsoft.UI.Xaml.2.8.6.zip
 Note

The latest version of Microsoft.UI.Xaml was 2.8.6 at time of this article. Replace the version 2.8.6 in the above command with the latest version downloaded from the Microsoft UI Xaml NuGet gallery.

Open the .zip folder renamed in the previous step using File Explorer and copy the file tools\AppX\<your architecture>\release\Microsoft.UI.Xaml.2.8.appx to your downloads folder. This file will be installed to your device in a future step.
For more information about working with .zip files, see zipping and unzipping files.
Install WinGet Client
Launch PowerShell as Administrator

Install the Desktop Framework Package using the PowerShell command Add-AppxPackage.

PowerShell

Copy
Add-AppxPackage -Path <path to VCLibs .appx file>
Where

<path to VCLibs .appx file> is the fully qualified path to the VC++ v14 Desktop Framework Package you downloaded earlier.
Install Microsoft UI Xaml using the PowerShell command Add-AppxPackage.

PowerShell

Copy
Add-AppxPackage -Path <path to UI xaml.appx file>
Where

<path to UI xaml.appx file> is the fully qualified path to the Microsoft UI Xaml 2.8.6 package you downloaded earlier.
 Caution

Without the VCLibs and UI Xaml dependencies installed, the WinGet installer fails (without any error/warning messages). Specifically, the "winget.exe" file isn't added to "C:\Users\[Username]\AppData\Local\Microsoft\WindowsApps"

Install the WinGet client using the PowerShell command Add-AppxPackage.

PowerShell

Copy
Add-AppxPackage -Path <path to .msixbundle file>
Where

<path to .msixbundle file> is the fully qualified path to the WinGet bundle file you downloaded earlier.
Configure the WinGet client with the correct license file using the PowerShell command Add-AppxProvisionedPackage

PowerShell

Copy
Add-AppxProvisionedPackage -Online -PackagePath <path to .msixbundle file> -LicensePath <path to xml file>
Where

<path to .msixbundle file> is the fully qualified path to the WinGet bundle file
<path to xml file> is the fully qualified path to the License1.xml file you downloaded earlier.
All the commands ran

Now, you should see the winget.exe file appear at C:\Users\[Username]\AppData\Local\Microsoft\WindowsApps. Furthermore, it should also be automatically added to your path. You should also be able to use WinGet in the PowerShell terminal.
WinGet in powershell

 Tip

If the winget command is not recognized in PowerShell, try restarting PowerShell first, and if unsuccessful again, try restarting your computer.

Install Applications with WinGet
First, search the WinGet repository for the application you want to install. For example, to search for the 'Windows Camera' application, use the search command:

PowerShell

Copy
winget search "Windows Camera"
Next, learn more about the application with the show command:

PowerShell

Copy
winget show "Windows Camera"
Next, install the application with the install command:

PowerShell

Copy
winget install "Windows Camera"
For more detail on how to search, install, configure, and uninstall applications with WinGet, see Use WinGet.

 Note

These instructions are adapted from the original WinGet documentation targeting Windows desktop editions for Windows IoT Enterprise LTSC which does not have a Windows Store user experience. These instructions also incorporate guidance Zamiell's WinGet CLI repository discussion and from MuradBuyukasik's WinGet Scripts repository.

More Resources
Install WinGet on non-IoT LTSC Windows Versions
Using WinGet and Command Information
Additional resources
Events


Nov 20, 7 AM - Nov 22, 7 AM

Gain the competitive edge you need with powerful AI and Cloud solutions by attending Microsoft Ignite online.

Register now
Training

Module

Explore the Windows Package Manager tool - Training

Streamline the installation and maintenance of software on your computer by using Windows Package Manager. Explain the front-end components and commands, the Windows Package Manager repository, and how to contribute to the repository.

Certification

Microsoft 365 Certified: Endpoint Administrator Associate - Certifications

Plan and execute an endpoint deployment strategy, using essential elements of modern management, co-management approaches, and Microsoft Intune integration.

Documentation

winget download command

Downloads an installer for a package.

C++ Runtime packages for Desktop Bridge - Visual C++

Describes how Windows desktop applications that have a dependency on the C++ Runtime libraries can't redistribute the version of the libraries that's included with Visual Studio or via the Visual C++ redistributable (VCRedist) packages. Explains how to create a Desktop Bridge container that includes the correct C++ Runtime libraries.

install Command

Installs the specified application.

Show 5 more
Previous Versions
Blog
Contribute
Privacy
Terms of Use
Trademarks
© Microsoft 2024

Translate
 

© Ying Bun 2021 - 2024