Skip to content

Instantly share code, notes, and snippets.

@Cologler
Created August 7, 2020 10:20
Show Gist options
  • Save Cologler/ef4c6f853a443013c8308aac98206a11 to your computer and use it in GitHub Desktop.
Save Cologler/ef4c6f853a443013c8308aac98206a11 to your computer and use it in GitHub Desktop.
# base-on https://zhuanlan.zhihu.com/p/104046487
# clean patchs
Get-ChildItem -Path TCLS/patchs | Remove-Item
# clean Cross
Get-ChildItem -Path Cross | Where-Object -Property Name -NE -Value 'Apps' | Remove-Item –Recurse -Force
Get-ChildItem -Path Cross/Apps | Where-Object -Property Name -NE -Value 'Apps' | Remove-Item –Recurse -Force
# mark readonly.
$cross = Get-Item -Path Cross
if (!($cross.Attributes -band [system.IO.FileAttributes]::ReadOnly)) {
$cross.Attributes += 'ReadOnly'
}
# clean TPHelper
Get-ChildItem -Path TCLS/TenProtect/TP | Remove-Item –Recurse -Force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment