无法卸载MS Visual C ++ 2017 [英] Unable to uninstall MS Visual C++ 2017
问题描述
我正在尝试脚本(使用Powershell)以静默方式卸载MS Visual C ++ 2017.将卸载此方法的方法是通过控制面板或使用vcredist_x86.exe /从命令行执行程序和功能卸载到
卸载。
我尝试了很多不同的方法,我在Powershell中知道卸载但没有工作:
< span style ="color:#006400; font-size:x-small"> $ DetectedUninstallStrings =(Get-InstalledApplication -Name" Microsoft Visual C ++ 2017")。UninstallSubkey &NBSP;
ForEach
($ DetectedUninstallStrings中的$ UninstallString){ < span style ="color:#006400; font-size:x-small"> 执行-MSI
-Action"卸载" -Path" $ UninstallString" -ContinueOnError $ True} 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度>
Nor
使用: 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> < /跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度>
$ app = Get-WmiObject -Class Win32_Product | Where-Object {$ _。Name-like" * C ++ 2017 *"}
$ app.Uninstall()
也不使用GUID卸载,只能使用程序和功能或命令行卸载。 / p>
有没有人对如何使用Powershell以静默方式卸载它有任何想法?
谢谢,
跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度>
跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度>
嗨7ech,
欢迎来到MSDN论坛。
我很抱歉迟到的回复。我试图为你的要求执行一些脚本。现在,msiinv.exe可以使用cmd中的产品代码卸载程序,请参考
https://blogs.msdn.microsoft.com/astebner/2005/07/01/using-msiinv-to-gather-information-about-what-is-installed-on-a-computer/ 。
例如:
msiexec / x {CF2BEA3C-26EA-32F8-AA9B-331F7E34BA97}
我发现其他线程可以使用特定的脚本从"添加和删除程序"卸载程序,看看:
https://social.technet.microsoft.com/Forums/scriptcenter/en-US/60e06261-f134-41e8-9f99-6bada23a6f02/using-registry-uninstallstring-to-remove-software? forum = winserverpowershell
和
https://social.technet.microsoft.com/Forums/en-US/5c4db4cd-9c7b-4dd8-95a8-deb4772bc4a9/how- to-installuninstall-visual-studio-extension-using-powershell?forum = winserverpowershell 。
如果你遇到一些错误,可以在这里分享。
期待你的回复。
Br
可能
跨度>
I am trying to script (using Powershell) to silently uninstall MS Visual C++ 2017. The method that will uninstall this is by going through Programs and Features from the Control Panel or from the command line using vcredist_x86.exe /uninstall to uninstall.
I have tried many different methods, that I know off in Powershell to uninstall but none work:
$DetectedUninstallStrings = (Get-InstalledApplication -Name "Microsoft Visual C++ 2017").UninstallSubkey ForEach ($UninstallString in $DetectedUninstallStrings) { Execute-MSI -Action "Uninstall" -Path "$UninstallString" -ContinueOnError $True }
Nor using:
$app = Get-WmiObject –Class Win32_Product | Where-Object {$_.Name -like "* C++ 2017 *"}
$app.Uninstall()
Nor using the GUID to uninstall, only by using the Program and Features or the command line to uninstall.
Does anyone have any ideas on how I can uninstall this silently by using Powershell?
Thank you,
Hi 7ech,
Welcome to the MSDN forum.
I am sorry for the late reply. I have trying to perform some script for your requirement. For now, the msiinv.exe could uninstall the program by using product code in cmd, please refer to https://blogs.msdn.microsoft.com/astebner/2005/07/01/using-msiinv-to-gather-information-about-what-is-installed-on-a-computer/ .
For example: msiexec /x {CF2BEA3C-26EA-32F8-AA9B-331F7E34BA97}
And I find other thread that could using a specific script to uninstall program from "add and remove program", have a look with : https://social.technet.microsoft.com/Forums/scriptcenter/en-US/60e06261-f134-41e8-9f99-6bada23a6f02/using-registry-uninstallstring-to-remove-software?forum=winserverpowershell and https://social.technet.microsoft.com/Forums/en-US/5c4db4cd-9c7b-4dd8-95a8-deb4772bc4a9/how-to-installuninstall-visual-studio-extension-using-powershell?forum=winserverpowershell .
If you meet some error, you could share them here.
Looking forwards your reply.
Br
May
这篇关于无法卸载MS Visual C ++ 2017的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!