Is there a simple way to hook into the standard 'Add or Remove Programs' functionality using PowerShell to uninstall an existing application? Or to check if the application is installed?
相关问题
- How does the setup bootstrapper detect if prerequi
- How to Debug/Register a Permanent WMI Event Which
- Wix: How can I set, at runtime, the text to be dis
- Inheritance impossible in Windows Runtime Componen
- How can I do variable substitution in a here-strin
相关文章
- 在vscode如何用code runner打开独立的控制台窗口,以及设置好调试模式时窗口的编码?
- C#调用PowerShell的问题
- 如何让cmd.exe 执行 UNICODE 文本格式的批处理?
- 怎么把Windows开机按钮通过修改注册表指向我自己的程序
- Warning : HTML 1300 Navigation occured?
- EscapeDataString having differing behaviour betwee
- Bundling the Windows Mono runtime with an applicat
- Windows 8.1 How to fix this obsolete code?
I found out that Win32_Product class is not recommended because it triggers repairs and is not query optimized. Source
I found this post from Sitaram Pamarthi with a script to uninstall if you know the app guid. He also supplies another script to search for apps really fast here.
Call it this way:
EDIT: Over the years this answer has gotten quite a few upvotes. I would like to add some comments. I have not used PowerShell since, but I remember observing some issues:
-First 1
but I'm not sure. Feel free to edit.Using the WMI object takes forever. This is very fast if you just know the name of the program you want to uninstall.
Edit: Rob found another way to do it with the Filter parameter:
To fix up the second method in Jeff Hillman's post, you could either do a:
Or