當我們刷新電腦時,我會捕獲已安裝軟體的列表,以便我們可以確保替換軟體獲得所需的安裝。我想刪除預先安裝軟體的條目。我現在所做的事情是有效的,但我希望我會以艱難的方式做到這一點。如果呼叫 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