Estou capturando uma lista de softwares instalados quando atualizamos um computador para garantir que o substituto obtenha as instalações necessárias. Quero remover entradas de software pré-instalado. O que estou fazendo agora funciona, mas espero estar fazendo da maneira mais difícil. Não sou adverso em ligar para o PowerShell se isso for mais simples.
Editar: o software pré-instalado incluiria qualquer coisa nos filtros que estou usando aqui. Microsoft Office, Microsoft Visual Basic, Adobe Acrobat Reader, mcafee e assim por diante. A lista de software é inicialmente capturada em 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