【发布时间】:2019-10-22 19:20:27
【问题描述】:
关注this issue,我想卸载所有NI软件。从here 首先在CMD 中输入wmic。然后使用命令product get name我得到一堆以NI开头的软件:
NI Logos 19.0
NI Trace Engine
NI-MXDF 19.0.0f0 for 64 Bit Windows
WIF Core Dependencies Windows 19.0.0
NI-VISA USB Passport 19.0.0
NI-VISA SysAPI x64 support 19.0.0
NI Controller Driver 19.0 64-bit
NI ActiveX Container (64-bit)
Math Kernel Libraries
NI MXS 19.0.0
NI LabWindows/CVI 2019 Network Variable Library
NI-VISA GPIB Passport 19.0.0
NI LabWindows/CVI 2017 Low-Level Driver (Original)
NI-RPC 17.0.0f0 for Phar Lap ETS
NI LabWindows/CVI 2017 .NET Library (64-bit)
...
我可以单独卸载它们,例如:
product where name="NI Logos 19.0" call uninstall
然后我必须选择y/Y。鉴于我必须卸载很多这些软件,我想知道如何使这个过程自动化。步骤应该是这样的:
- 找出
product get name中所有以NI开头的行并列出来 - 上面列表中的for循环运行
product where name=list[i] call uninstall,默认y/Y
如果您能帮助我解决这个问题,我将不胜感激。提前感谢您的支持。
P.S. Powershell 解决方案也可以。实际上,使用任何其他方式卸载所有这些的任何其他解决方案对我来说都可以。
【问题讨论】:
标签: powershell batch-file cmd command-line uninstallation