網頁

Windows Server 2022之Windows Terminal安裝筆記

Windows Server 2022之Windows Terminal安裝筆記

在前一篇「利用POWERSHELL下載離線WINDOWS-TERMINAL應用程式」有提供Windows Server 2022的安裝指令,如果是在Windows Server 2022只要一行簡單的指令就能安裝Windows Terminal。終於拿到Windows Server 2022環境,第一件事就是把Windows Terminal裝起來,結果並不是「一行指令」,以下是簡單安裝筆記。

我們在Windows Terminal Releases發現現在有區分Win10與Win11兩個版本,習慣性下載最新版:

PS D:\tools> Add-AppPackage .\Microsoft.WindowsTerminal_Win11_1.12.10983.0_8wekyb3d8bbwe.msixbundle
Add-AppPackage : Deployment failed with HRESULT: 0x80073CFD, A Prerequisite for an install could not be satisfied.
Windows cannot install package Microsoft.WindowsTerminal_1.12.10983.0_x64__8wekyb3d8bbwe because this package is not compatible with the device. The package requires OS version 10.0.22000.0 or higher on the Windows.Desktop device
family. The device is currently running OS version 10.0.20348.643.
NOTE: For additional information, look for [ActivityId] 87ecfadb-6a6a-0003-5f6c-ed876a6ad801 in the Event Log or use the command line Get-AppPackageLog -ActivityID 87ecfadb-6a6a-0003-5f6c-ed876a6ad801
At line:1 char:1
+ Add-AppPackage .\Microsoft.WindowsTerminal_Win11_1.12.10983.0_8wekyb3 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (D:\tools\Micros...bbwe.msixbundle:String) [Add-AppxPackage], Exception
    + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand

Win11的OS Version太新造成裝不上去,那就下載Win10試試:

PS D:\tools> Add-AppPackage .\Microsoft.WindowsTerminal_Win10_1.12.10982.0_8wekyb3d8bbwe.msixbundle
Add-AppPackage : Deployment failed with HRESULT: 0x80073CF3, Package failed updates, dependency or conflict validation.
Windows cannot install package Microsoft.WindowsTerminal_1.12.10982.0_x64__8wekyb3d8bbwe because this package depends on a framework that could not be found. Provide the framework "Microsoft.VCLibs.140.00.UWPDesktop" published by
"CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US", with neutral or x64 processor architecture and minimum version 14.0.30035.0, along with this package to install. The frameworks with name
"Microsoft.VCLibs.140.00.UWPDesktop" currently installed are
Windows cannot install package Microsoft.WindowsTerminal_1.12.10982.0_x64__8wekyb3d8bbwe because this package depends on a framework that could not be found. Provide the framework "Microsoft.VCLibs.140.00.UWPDesktop" published by
"CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US", with neutral or x64 processor architecture and minimum version 14.0.30035.0, along with this package to install. The frameworks with name
"Microsoft.VCLibs.140.00.UWPDesktop" currently installed are: {}
NOTE: For additional information, look for [ActivityId] 87ecfadb-6a6a-0003-906c-ed876a6ad801 in the Event Log or use the command line Get-AppPackageLog -ActivityID 87ecfadb-6a6a-0003-906c-ed876a6ad801
At line:1 char:1
+ Add-AppPackage .\Microsoft.WindowsTerminal_Win10_1.12.10982.0_8wekyb3 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (D:\tools\Micros...bbwe.msixbundle:String) [Add-AppxPackage], IOException
    + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand

發現Releases說明有這二段說明:

If you intend on using Terminal as an unpackaged application--that is, extracting the msix file--we recommend that you use the Win10 bundle. You will need the Visual C++ runtime redistributable.
In addition, if you install the packaged version on either Windows 10 or Windows 11, it now depends on the Visual C++ Universal Runtime Package.

下載C++ Runtime:

依照錯誤訊息,下載第二個「Microsoft.VCLibs.x64.14.00.Desktop.appx」即可:

Add-AppPackage .\Microsoft.VCLibs.x64.14.00.Desktop.appx
Add-AppPackage .\Microsoft.WindowsTerminal_Win10_1.12.10982.0_8wekyb3d8bbwe.msixbundle

這樣就順利在Windows Server 2022上安裝Windows Terminal。第一次點擊Windows Terminal會有點久才有反應,第一次之後的啟動就正常了。終於正式在Windows Server上見到Windows Terminal,有著莫名的感動。

沒有留言:

張貼留言

感謝您的留言,如果我的文章你喜歡或對你有幫助,按個「讚」或「分享」它,我會很高興的。