由于软件的反复出现漏洞,我试图从十几台Windows 8.1计算机中删除Lenovo Fingerprint Manager Pro。
我编写了以下批处理文件以删除它。虽然它在我的初始测试中起作用,但在随后的尝试中失败了。
我一直在寻找错误的位置,以及是否有人可以更好地解决此问题?
@echo off
REM This file will remove the Lenovo Finger print scanner and the relevant registry entries.
DEL "C:\windows\Installer\fa4f.msi"
set folder="C:\Program Files\Lenovo\Fingerprint Manager Pro"
cd /d %folder%
for /F "delims=" %%i in ('dir /b') do (rmdir "%%i" /s/q || del "%%i" /s/q)
cd /d %folder%
cd ..
rmdir %folder%
REG DELETE HKEY_CLASSES_ROOT\CLSID\{940B1CC9-013F-468e-BBBF-4A975461F120} /f
REG DELETE HKEY_LOCAL_MACHINE\SOFTWARE\Lenovo\Fingerprint Software /f
REG DELETE HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{314FAD12-F785-4471-BCE8-AB506642B9A1} /f
ECHO Lenovo Fingerprint Scanner Removed Successfully.
答案 0 :(得分:1)
在powershell中,您可以将程序作为对象获取并在该对象上调用uninstall:
$App = Get-WmiObject -Class Win32_Product | Where-Object {
$_.Name -match "Software Name"}
$App.uninstall()
如果你真的想要清理注册表和所有有趣的东西,你可以做到这一点。