Once again, AI is great at spewing code. Terrible at requirements (because AI doesn't do test runs!).Follow-up: I asked co-pilot how to do this and it gave me the below powershell script. I want to stress that I have not tested this, but the claim is that this code will do what you are looking for. Test it on unimportant data first!
Suppose your naive user points this to C:\Windows.
Code:
What if: Performing the operation "Remove Directory" on target "C:\Windows\SysWOW64\com\dmp".
What if: Performing the operation "Remove Directory" on target "C:\Windows\SysWOW64\drivers\UMDF\en-US".
What if: Performing the operation "Remove Directory" on target "C:\Windows\SysWOW64\DriverStore\FileRepository".
What if: Performing the operation "Remove Directory" on target "C:\Windows\SysWOW64\LogFiles\Windows Portable Devices".
What if: Performing the operation "Remove Directory" on target "C:\Windows\SysWOW64\migwiz\dlmanifests\Microsoft-Windows-IE-ESC".
What if: Performing the operation "Remove Directory" on target "C:\Windows\SysWOW64\migwiz\dlmanifests\Microsoft-Windows-RasApi".
What if: Performing the operation "Remove Directory" on target "C:\Windows\SysWOW64\MUI\dispspec".
What if: Performing the operation "Remove Directory" on target "C:\Windows\SysWOW64\oobe\en-US".
What if: Performing the operation "Remove Directory" on target "C:\Windows\SysWOW64\Setup\en-US".
What if: Performing the operation "Remove Directory" on target "C:\Windows\SysWOW64\sysprep\en-US".
What if: Performing the operation "Remove Directory" on target "C:\Windows\SysWOW64\wbem\AutoRecover".
What if: Performing the operation "Remove Directory" on target "C:\Windows\SysWOW64\wbem\Logs".
What if: Performing the operation "Remove Directory" on target "C:\Windows\SysWOW64\wbem\Repository".
What if: Performing the operation "Remove Directory" on target "C:\Windows\SysWOW64\wbem\tmf".
What if: Performing the operation "Remove Directory" on target "C:\Windows\SysWOW64\WindowsPowerShell\v1.0\SessionConfig".
What if: Performing the operation "Remove Directory" on target "C:\Windows\Vss\Writers\Application".
What if: Performing the operation "Remove Directory" on target "C:\Windows\winsxs\amd64_microsoft-windows-baseapinamespace_31bf3856ad364e35_6.1.7601.17514_none_a4272f399040a523".
What if: Performing the operation "Remove Directory" on target "C:\Windows\winsxs\amd64_microsoft-windows-d..evelapisets-windows_31bf3856ad364e35_7.1.7601.16492_none_e249fd3fed68cb81".
What if: Performing the operation "Remove Directory" on target "C:\Windows\winsxs\amd64_microsoft-windows-downlevelapisets-base_31bf3856ad364e35_7.1.7601.16492_none_1ed670cbaddb31b7".
What if: Performing the operation "Remove Directory" on target "C:\Windows\winsxs\amd64_microsoft-windows-downlevelapisets-com_31bf3856ad364e35_7.1.7601.16492_none_5b1161f912e23f6d".
What if: Performing the operation "Remove Directory" on target "C:\Windows\winsxs\amd64_microsoft-windows-downlevelapisets-shell_31bf3856ad364e35_7.1.7601.16492_none_2b20f882c1c0eaca".
What if: Performing the operation "Remove Directory" on target "C:\Windows\winsxs\amd64_microsoft-windows-minioapinamespace_31bf3856ad364e35_6.1.7600.16385_none_c8b8ba7bcb4e2c66".
I hope you have backups...
Last edited:
My Computer
System One
-
- OS
- Windows 7