added cleanmgr to script
This commit is contained in:
@@ -75,6 +75,11 @@ If ( IsAdmin )
|
|||||||
ForEach ( $tempfile in $AutoCADTempFiles ) { Remove-Item $tempfile -Force -ErrorAction SilentlyContinue }
|
ForEach ( $tempfile in $AutoCADTempFiles ) { Remove-Item $tempfile -Force -ErrorAction SilentlyContinue }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Silently run cleanmgr.exe with default settings
|
||||||
|
LogMsg "Running cleanmgr.exe with default settings"
|
||||||
|
Try { Start-Process "cleanmgr.exe" -ArgumentList "/VERYLOWDISK" }
|
||||||
|
Catch { LogErr $_.Exception.Message }
|
||||||
}
|
}
|
||||||
|
|
||||||
# Only run this section if we don't have administrative privileges
|
# Only run this section if we don't have administrative privileges
|
||||||
@@ -98,4 +103,9 @@ Else
|
|||||||
ForEach ( $tempfile in $AutoCADTempFiles ) { Remove-Item $tempfile -Force -ErrorAction SilentlyContinue }
|
ForEach ( $tempfile in $AutoCADTempFiles ) { Remove-Item $tempfile -Force -ErrorAction SilentlyContinue }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Silently run cleanmgr.exe with default settings
|
||||||
|
LogMsg "Running cleanmgr.exe with default settings"
|
||||||
|
Try { Start-Process "cleanmgr.exe" -ArgumentList "/VERYLOWDISK" }
|
||||||
|
Catch { LogErr $_.Exception.Message }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user