我从注册表中获得以下卸载字符串:
$uninstallstring = MsiExec.exe /X{123-12323-123213-A6123-123123}"我可以使用以下方法执行此字符串:
cmd /c $uninstallstring这是可行的,但是我想用参数/quiet和/norestart来执行它。但是,如果我试图附加参数,则无法执行卸载字符串:
$uninstallstring+=" /quiet /norestart"
cmd /c $uninstallstring如何在Powershell中使用这些参数执行卸载字符串?
谢谢!
发布于 2022-10-19 14:16:42
在powershell 5.1中,这应该适用于msi安装的任何名称。
uninstall-package 'google chrome'https://stackoverflow.com/questions/74124764
复制相似问题