Skip to content

Commit

Permalink
Fix Adwcleaner and shutup10 not running (#96)
Browse files Browse the repository at this point in the history
* Change CONTRIBUTING to a less strict policy

* Fix path not being found while downloading (#95)
- This is not a complete fix
  • Loading branch information
LeDragoX authored Mar 20, 2023
1 parent c827e14 commit e5d0259
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/lib/Request-FileDownload.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ function Request-FileDownload {

Write-Verbose "[?] I'm at: $PWD"
Write-Verbose "[?] Downloading at: $OutputFolder + $ExtendFolder"
$OutputFolder = Join-Path -Path $OutputFolder -ChildPath $ExtendFolder

If ($ExtendFolder) {
$OutputFolder = Join-Path -Path $OutputFolder -ChildPath $ExtendFolder
}

If (!(Test-Path $OutputFolder)) {
Write-Status -Types "@" -Status "$OutputFolder doesn't exist, creating folder..."
New-Item -Path $OutputFolder
New-Item -Path $OutputFolder -ItemType Directory
}

$FileLocation = $(Join-Path -Path $OutputFolder -ChildPath "$OutputFile")
Expand Down
6 changes: 3 additions & 3 deletions src/scripts/Use-DebloatSoftware.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ function Use-DebloatSoftware() {

If (!$Revert) {
$AdwCleanerDl = "https://downloads.malwarebytes.com/file/adwcleaner"
$AdwCleanerOutput = Request-FileDownload -FileURI $AdwCleanerDl -OutputFile "adwcleaner.exe"
[String] $AdwCleanerOutput = Request-FileDownload -FileURI $AdwCleanerDl -OutputFile "adwcleaner.exe"
Write-Status -Types "+" -Status "Running MalwareBytes AdwCleaner scanner..."
Start-Process -FilePath $AdwCleanerOutput -ArgumentList "/eula", "/clean", "/noreboot" -Wait
Remove-ItemVerified $AdwCleanerOutput -Force
}

Copy-Item -Path "$PSScriptRoot\..\configs\shutup10" -Destination "$(Get-TempScriptFolder)\downloads" -Recurse -Force
$ShutUpDl = "https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe"
$ShutUpOutput = Request-FileDownload -FileURI $ShutUpDl -ExtendFolder "shutup10" -OutputFile "OOSU10.exe"
[String] $ShutUpOutput = Request-FileDownload -FileURI $ShutUpDl -ExtendFolder "shutup10" -OutputFile "OOSU10.exe"
Push-Location -Path (Split-Path -Path $ShutUpOutput)

If ($Revert) {
Expand All @@ -32,7 +32,7 @@ function Use-DebloatSoftware() {
Start-Process -FilePath $ShutUpOutput -ArgumentList "ooshutup10.cfg", "/quiet" -Wait # Wait until the process closes #
}

Remove-ItemVerified "$ShutUpOutput" -Force # Leave no extra files
Remove-ItemVerified $ShutUpOutput -Force # Leave no extra files
Pop-Location
}

Expand Down

0 comments on commit e5d0259

Please sign in to comment.