简体   繁体   English

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

[英]install cab file (Edge WebView2) via Powershell/cmd

I want to install Edge WebView2 Runtime FixedVersion with a cab file: Microsoft.WebView2.FixedVersionRuntime.100.0.1185.50.x64.cab我想使用 cab 文件安装 Edge WebView2 Runtime FixedVersion :Microsoft.WebView2.FixedVersionRuntime.100.0.1185.50.x64.cab

How can I install WebView2 Runtime with this cab file via Powershell/cmd?如何通过 Powershell/cmd 使用此 cab 文件安装 WebView2 Runtime?

I've tried我试过了

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

I've copied the file to C:\Temp but when I try to execude this code, it says "the system cannot find the file specified"我已将文件复制到 C:\Temp 但是当我尝试执行此代码时,它显示“系统找不到指定的文件”

What am I doing wrong?我究竟做错了什么?

BR BR

You do not need to install a WebView2 Runtime Fixed Version cab.您不需要安装 WebView2 运行时固定版本 cab。 You can just expand it to any new folder you like.您可以将其扩展到您喜欢的任何新文件夹。 To expand a Fixed Version cab you run the following:要展开固定版本 cab,请运行以下命令:

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

So in your case:所以在你的情况下:

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

This will result in a new folder C:\Temp\Microsoft.WebView2.FixedVersionRuntime.100.0.1185.39.x64 containing the directory structure stored in the cab.这将生成一个新文件夹C:\Temp\Microsoft.WebView2.FixedVersionRuntime.100.0.1185.39.x64 ,其中包含存储在 cab 中的目录结构。

See Details about the Fixed Version runtime distribution mode .请参阅有关固定版本运行时分发模式的详细信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM