过滤文本

过滤文本

当我们刷新计算机时,我会捕获已安装软件的列表,以确保替换软件获得所需的安装。我想删除预安装软件的条目。我现在正在做的事情有效,但我认为我做得很难。如果这样更简单,我并不反对调用 PowerShell。

编辑:预装软件将包括我在此处使用的过滤器中的任何内容。Microsoft Office、Microsoft Visual Basic、Adobe Acrobat Reader、mcafee 等等。软件列表最初被捕获到 temp1.txt 中。

:: Filter out some unneeded entries
findstr /v /i /c:"security update" temp1.txt > temp2.txt
findstr /v /i /c:"service pack" temp2.txt > temp1.txt
findstr /v /i /c:"update for" temp1.txt > temp2.txt
findstr /v /i /c:"mcafee" temp2.txt > temp1.txt
findstr /v /i /c:"@C" temp1.txt > temp2.txt
findstr /v /i /c:"Intel" temp2.txt > temp1.txt
findstr /v /i /c:"Microsoft Office" temp1.txt > temp2.txt
findstr /v /i /c:"Microsoft Visual" temp2.txt > temp1.txt
findstr /v /i /c:"yyyy" temp1.txt > temp2.txt
findstr /v /i /c:"uuuu" temp2.txt > temp1.txt
findstr /v /i /c:"Conexant" temp1.txt > temp2.txt
findstr /v /i /c:"Adobe Acrobat Reader" temp2.txt > temp1.txt
findstr /v /i /c:"Apple Application" temp1.txt > temp2.txt
findstr /v /i /c:"Bonjour" temp2.txt > temp1.txt
findstr /v /i /c:"Cisco" temp1.txt > temp2.txt
findstr /v /i /c:"COV" temp2.txt > temp1.txt
findstr /v /i /c:"G Suite" temp1.txt > temp2.txt
findstr /v /i /c:"Google" temp2.txt > temp1.txt
findstr /v /i /c:"xxxx" temp1.txt > temp2.txt
findstr /v /i /c:"RSA" temp2.txt > temp1.txt
findstr /v /i /c:"Synaptics" temp1.txt > temp2.txt
findstr /v /i /c:"zzzz" temp2.txt > temp1.txt
findstr /v /i /c:"VLC" temp1.txt > temp2.txt
findstr /v /i /c:"VMware" temp2.txt > temp1.txt
findstr /v /i /c:"Vulkan" temp1.txt > temp2.txt
findstr /v /i /c:"Windows 10 Image Viewer" temp2.txt > temp1.txt
findstr /v /i /c:"Java" temp1.txt > temp2.txt
findstr /v /i /c:"Microsoft Access" temp2.txt > temp1.txt
findstr /v /i /c:"Microsoft DCF" temp1.txt > temp2.txt
findstr /v /i /c:"Microsoft Excel" temp2.txt > temp1.txt
findstr /v /i /c:"Microsoft Groove" temp1.txt > temp2.txt
findstr /v /i /c:"Microsoft InfoPath" temp2.txt > temp1.txt
findstr /v /i /c:"Microsoft OneNote" temp1.txt > temp2.txt
findstr /v /i /c:"Microsoft Outlook" temp2.txt > temp1.txt
findstr /v /i /c:"Microsoft PowerPoint" temp1.txt > temp2.txt
findstr /v /i /c:"Microsoft Publisher" temp2.txt > temp1.txt
findstr /v /i /c:"Microsoft Skype" temp1.txt > temp2.txt
findstr /v /i /c:"Microsoft Word" temp2.txt > temp1.txt
findstr /v /i /c:"Self-service" temp1.txt > temp2.txt
findstr /v /i /c:"Microsoft Silverlight" temp2.txt > installed_software.txt

相关内容