-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbloatware_cleanup.ps1
More file actions
36 lines (22 loc) · 1.4 KB
/
bloatware_cleanup.ps1
File metadata and controls
36 lines (22 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Ensure execution policy allows running scripts
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force
# Download and run VBS script silently using CSCRIPT
$githubVbsUrl = "https://raw.githubusercontent.com/demo7up/abletp/main/remove_c2r.vbs"
$tempVbsPath = "$env:TEMP\remove_c2r.vbs"
Invoke-WebRequest -Uri $githubVbsUrl -OutFile $tempVbsPath -UseBasicParsing
$output = & cscript.exe //Nologo "$tempVbsPath"
$output | Out-File "$env:ProgramData\Debloat\vbs_output.log" -Encoding UTF8 -Force
Write-Output "VBS output saved to: $env:ProgramData\Debloat\vbs_output.log"
Remove-Item $tempVbsPath -Force
# Download bloatware.ps1 and run from GitHub
$githubPs1Url = "https://raw.githubusercontent.com/demo7up/abletp/main/bloatware.ps1"
$tempPs1Path = "$env:TEMP\bloatware.ps1"
Invoke-WebRequest -Uri $githubPs1Url -OutFile $tempPs1Path -UseBasicParsing
Start-Process powershell.exe -ArgumentList "-NoProfile", "-ExecutionPolicy Bypass", "-File", "`"$tempPs1Path`"" -Wait
Remove-Item $tempPs1Path -Force
# Download device_rename.ps1 and run from GitHub
$githubPs1Url = "https://raw.githubusercontent.com/demo7up/abletp/main/app_deployment.ps1"
$tempPs1Path = "$env:TEMP\app_deployment.ps1"
Invoke-WebRequest -Uri $githubPs1Url -OutFile $tempPs1Path -UseBasicParsing
Start-Process powershell.exe -ArgumentList "-NoProfile", "-ExecutionPolicy Bypass", "-File", "`"$tempPs1Path`"" -Wait
Remove-Item $tempPs1Path -Force