通过Powershell/cmd安装cab文件(Edge WebView2)

问题描述 投票:0回答:2

我想使用 cab 文件安装 Edge WebView2 Runtime FixedVersion: Microsoft.WebView2.FixedVersionRuntime.100.0.1185.50.x64.cab

如何通过 Powershell/cmd 使用此 cab 文件安装 WebView2 运行时?

我已经尝试过了

dism.exe /online /add-package /packagepath:"C:\Temp\Microsoft.WebView2.FixedVersionRuntime.100.0.1185.39.x64.cab" /quiet /norestart 

我已将文件复制到 C:\Temp 但当我尝试执行此代码时,它显示“系统找不到指定的文件”

我做错了什么?

BR

powershell cmd webview2 cab
2个回答
1
投票

您不需要安装 WebView2 Runtime 固定版本 cab。您可以将其扩展到您喜欢的任何新文件夹。要扩展固定版本 cab,请运行以下命令:

expand {path to the package} -F:* {path to the destination folder}

所以在你的情况下:

expand C:\Temp\Microsoft.WebView2.FixedVersionRuntime.100.0.1185.39.x64.cab -F:* C:\Temp\

这将产生一个新文件夹

C:\Temp\Microsoft.WebView2.FixedVersionRuntime.100.0.1185.39.x64
,其中包含存储在驾驶室中的目录结构。

参见有关固定版本运行时分发模式的详细信息


0
投票

使用powershell

Add-WindowsPackage
:

(我仔细检查了路径)

有什么帮助吗?

© www.soinside.com 2019 - 2024. All rights reserved.