fix the recycling bin option (#32)

* update the recycling bin option

Powershell has a module in PS 5.1+ called Clear-Recyclebin that works better than the CMD method - rd /s %systemdrive%\$Recycle.bin

* update recycling bin delete command

one liner of ComObject in powershell instead of cmd asking for confirmation. adds better backwards compatibility.
This commit is contained in:
Clayton Errington
2020-09-16 15:22:33 -05:00
committed by GitHub
parent 82d509129b
commit 15db311801

View File

@@ -384,7 +384,7 @@ actions:
- -
name: Empty trash bin name: Empty trash bin
recommend: false recommend: false
code: rd /s %systemdrive%\$Recycle.bin code: Powershell -Command "$bin = (New-Object -ComObject Shell.Application).NameSpace(10);$bin.items() | ForEach { Write-Host "Deleting $($_.Name) from Recycle Bin"; Remove-Item $_.Path -Recurse -Force}"
- -
name: Enable Reset Base in Dism Component Store name: Enable Reset Base in Dism Component Store
recommend: true recommend: true