string - 使用参数启动进程
问题描述
我正在尝试创建一个允许用户开始在线修复 Office 的脚本,我正在检查他们是否有 32 位或 64 位然后是语言。
我制作了以下脚本,但没有任何反应,我不知道为什么
$culture = (Get-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration)."ClientCulture"
$platform = (Get-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration)."Platform"
$CMD = "C:\Program Files\Common Files\microsoft shared\ClickToRun\OfficeClickToRun.exe"
Start-Process -FilePath $CMD -ArgumentList @("scenario=Repair", "platform=$platform", "culture=$culture", "forceappshutdown=True", "RepairType=FullRepair", "DisplayLevel=True") -Wait
解决方案
推荐阅读
- generics - 包含闭包参数的方法需要错误的类型?
- python - 如何在 XML Python 中再迭代一个节点?
- python - 显示外键值
- ansible - azure_rm_dnszones 找不到资源组
- reactjs - React 模拟 Graphql 订阅
- java - Sparql 与 Java Jena
- python - TypeError: can't pickle _thread.RLock objects, K.shape 问题
- image - 如何为 Pneu Alpha 函数创建位图:错误位图格式无效。仅选择 16 或 256 色位图
- reactjs - 如果未定义数据,如何传递 null?
- php - SQL Query 运行良好,但现在当我尝试将它与 PHP 一起使用时,查询失败