@@ -13,10 +13,10 @@ function Invoke-DebloatSoftware() {
13
13
14
14
If (! $Revert ) {
15
15
$AdwCleanerDl = " https://downloads.malwarebytes.com/file/adwcleaner"
16
- [String ] $AdwCleanerOutput = (Request-FileDownload - FileURI $AdwCleanerDl - OutputFile " adwcleaner.exe" )
16
+ [String ] $AdwCleanerOutput = (Request-FileDownload - FileURI $AdwCleanerDl - ExtendFolder " adwcleaner " - OutputFile " adwcleaner.exe" )
17
17
Write-Status - Types " +" - Status " Running MalwareBytes AdwCleaner scanner..."
18
18
Start-Process - FilePath " $AdwCleanerOutput " - ArgumentList " /eula" , " /clean" , " /noreboot" - Wait
19
- Remove-ItemVerified $AdwCleanerOutput - Force
19
+ Remove-ItemVerified ( Split-Path - Path $AdwCleanerOutput ) - Force - Recurse
20
20
}
21
21
22
22
Copy-Item - Path " $PSScriptRoot \..\configs\shutup10" - Destination " $ ( Get-TempScriptFolder ) \downloads" - Recurse - Force
@@ -26,14 +26,14 @@ function Invoke-DebloatSoftware() {
26
26
27
27
If ($Revert ) {
28
28
Write-Status - Types " *" - Status " Running ShutUp10 and REVERTING to default settings..."
29
- Start-Process - FilePath $ShutUpOutput - ArgumentList " ooshutup10-default.cfg" , " /quiet" - Wait # Wait until the process closes #
29
+ Start-Process - FilePath " $ShutUpOutput " - ArgumentList " ooshutup10-default.cfg" , " /quiet" - Wait # Wait until the process closes #
30
30
} Else {
31
31
Write-Status - Types " +" - Status " Running ShutUp10 and applying Recommended settings..."
32
- Start-Process - FilePath $ShutUpOutput - ArgumentList " ooshutup10.cfg" , " /quiet" - Wait # Wait until the process closes #
32
+ Start-Process - FilePath " $ShutUpOutput " - ArgumentList " ooshutup10.cfg" , " /quiet" - Wait # Wait until the process closes #
33
33
}
34
-
35
- Remove-ItemVerified $ShutUpOutput - Force # Leave no extra files
34
+
36
35
Pop-Location
36
+ Remove-ItemVerified (Split-Path - Path $ShutUpOutput ) - Force - Recurse # Leave no extra files
37
37
}
38
38
39
39
If (! $Revert ) {
0 commit comments