* clean up

* Update runspace.ps1 for new tweaks (#291)

* clean up (#290)

* Update Tweaks

Co-authored-by: Chris Titus <dfm.titus@gmail.com>

* Github actions to update script based on branch (#294)

* clean up (#290)

* Update Tweaks

* test pipeline

* test pipeline

* chore: autopublish 2022-10-19T09:34:35Z

* test pipeline

* test pipeline

* chore: autopublish 2022-10-19T11:39:50Z

* test pipeline

* test pipeline

* test pipeline

* test pipeline

* test pipeline

* test pipeline

* test

* please work

* Update Branch in script

* test new variable

* Update Branch in script

* test all branches

* updated $BranchToUse to use the correct casing

Co-authored-by: Chris Titus <dfm.titus@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: DeveloperDurp <DeveloperDurp@users.noreply.github.com>

* bring test up to date (#295)

* clean up (#290)

* Update README.md

* Update README.md

* Update README.md

* Update release.yaml

* Replace Broken Issue Links in KnownIssues.md (#297)

- The issues listed in KnownIssues.md were broken due to the issues tab in the previous repo being removed.
  - Replaced with issues in this repo that apply to the issues, if there were any
- I think this issue could be applied to the main branch without worry, but I'll leave that up to you.

* Update Branch in script

* Implement check for local ooshutup10.cfg file (#298)

- Checks for an ooshutup10.cfg file in the current directory and uses it if found
  - This allows users to use custom config files if they wish

* bring winget install script (#302)

* clean up (#290)

* Update README.md

* Update README.md

* Update README.md

* Update winget.ps1

* Update Branch in script

* Brave Fix

* Fix Flickering

New Windows versions HATE timeout tweaks

* Fixing Error Messages

* syntax fix

* Switch to PSGallery winget-installer

* Adding Branch Variables from #309

* typo

* teams uninstall fix

* Fix Uninstall MS Apps Issues

* Update Branch in script

Co-authored-by: DeveloperDurp <developerdurp@durp.info>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: DeveloperDurp <DeveloperDurp@users.noreply.github.com>
Co-authored-by: Carter <60557606+Carterpersall@users.noreply.github.com>
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
This commit is contained in:
Chris Titus 2022-10-23 00:48:39 -05:00 committed by GitHub
parent 428f340f23
commit 1d96e8a96c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 41 additions and 38 deletions

View File

@ -211,7 +211,7 @@
<CheckBox Name="EssTweaksDiskCleanup" Content="Run Disk Cleanup" Margin="5,0" ToolTip="Runs Disk Cleanup on Drive C: and removes old Windows Updates."/>
<CheckBox Name="EssTweaksLoc" Content="Disable Location Tracking" Margin="5,0" ToolTip="Disables Location Tracking...DUH!"/>
<CheckBox Name="EssTweaksHome" Content="Disable Homegroup" Margin="5,0" ToolTip="Disables HomeGroup - Windows 11 doesn't have this, it was awful."/>
<CheckBox Name="EssTweaksStorage" Content="Disable Storage Sense" Margin="5,0" ToolTip="Storage Sense is supposed to delete temp files automatically, but often runs at wierd times and mostly doesn't do much. Although when it was introduced in Win 10 (1809 Version) it deleted people's documents... So there is that."/>
<CheckBox Name="EssTweaksStorage" Content="Disable Storage Sense" Margin="5,0" ToolTip="Storage Sense is supposed to delete temp files automatically, but can run at active times and mostly doesn't do much. Although when it was introduced in Win 10 (1809 Version) it deleted people's documents... So there is that."/>
<CheckBox Name="EssTweaksHiber" Content="Disable Hibernation" Margin="5,0" ToolTip="Hibernation is really meant for laptops as it saves whats in memory before turning the pc off. It really should never be used, but some people are lazy and rely on it. Don't be like Bob. Bob likes hibernation."/>
<CheckBox Name="EssTweaksDVR" Content="Disable GameDVR" Margin="5,0" ToolTip="GameDVR is a Windows App that is a dependancy for some Store Games. I've never met someone that likes it, but it's there for the XBOX crowd."/>
<CheckBox Name="EssTweaksServices" Content="Set Services to Manual" Margin="5,0" ToolTip="Turns a bunch of system services to manual that don't need to be running all the time. This is pretty harmless as if the service is needed, it will simply start on demand."/>

View File

@ -1,5 +1,5 @@
#for CI/CD
$BranchToUse = 'main'
$BranchToUse = 'test'
<#
.NOTES

View File

@ -1305,48 +1305,51 @@ $WPFtweaksbutton.Add_Click({
"HPSystemInformation"
)
## Teams Removal
# Remove Teams Machine-Wide Installer
Write-Host "Removing Teams Machine-wide Installer" -ForegroundColor Yellow
$MachineWide = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -eq "Teams Machine-Wide Installer" }
$MachineWide.Uninstall()
# Remove Teams for Current Users
$localAppData = "$($env:LOCALAPPDATA)\Microsoft\Teams"
$programData = "$($env:ProgramData)\$($env:USERNAME)\Microsoft\Teams"
If (Test-Path "$($localAppData)\Current\Teams.exe") {
unInstallTeams($localAppData)
## Teams Removal - Source: https://github.com/asheroto/UninstallTeams
function getUninstallString($match) {
return (Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty | Where-Object { $_.DisplayName -like "*$match*" }).UninstallString
}
elseif (Test-Path "$($programData)\Current\Teams.exe") {
unInstallTeams($programData)
$TeamsPath = [System.IO.Path]::Combine($env:LOCALAPPDATA, 'Microsoft', 'Teams')
$TeamsUpdateExePath = [System.IO.Path]::Combine($TeamsPath, 'Update.exe')
Write-Output "Stopping Teams process..."
Stop-Process -Name "*teams*" -Force -ErrorAction SilentlyContinue
Write-Output "Uninstalling Teams from AppData\Microsoft\Teams"
if ([System.IO.File]::Exists($TeamsUpdateExePath)) {
# Uninstall app
$proc = Start-Process $TeamsUpdateExePath "-uninstall -s" -PassThru
$proc.WaitForExit()
}
else {
Write-Warning "Teams installation not found"
Write-Output "Removing Teams AppxPackage..."
Get-AppxPackage "*Teams*" | Remove-AppxPackage -ErrorAction SilentlyContinue
Get-AppxPackage "*Teams*" -AllUsers | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue
Write-Output "Deleting Teams directory"
if ([System.IO.Directory]::Exists($TeamsPath)) {
Remove-Item $TeamsPath -Force -Recurse -ErrorAction SilentlyContinue
}
# Get all Users
$Users = Get-ChildItem -Path "$($ENV:SystemDrive)\Users"
# Process all the Users
$Users | ForEach-Object {
Write-Host "Process user: $($_.Name)" -ForegroundColor Yellow
#Locate installation folder
$localAppData = "$($ENV:SystemDrive)\Users\$($_.Name)\AppData\Local\Microsoft\Teams"
$programData = "$($env:ProgramData)\$($_.Name)\Microsoft\Teams"
If (Test-Path "$($localAppData)\Current\Teams.exe") {
unInstallTeams($localAppData)
}
elseif (Test-Path "$($programData)\Current\Teams.exe") {
unInstallTeams($programData)
}
else {
Write-Warning "Teams installation not found for user $($_.Name)"
}
Write-Output "Deleting Teams uninstall registry key"
# Uninstall from Uninstall registry key UninstallString
$us = getUninstallString("Teams");
if ($us.Length -gt 0) {
$us = ($us.Replace("/I", "/uninstall ") + " /quiet").Replace(" ", " ")
$FilePath = ($us.Substring(0, $us.IndexOf(".exe") + 4).Trim())
$ProcessArgs = ($us.Substring($us.IndexOf(".exe") + 5).Trim().replace(" ", " "))
$proc = Start-Process -FilePath $FilePath -Args $ProcessArgs -PassThru
$proc.WaitForExit()
}
cmd /c winget uninstall -h "Microsoft Teams"
Write-Output "Restart computer to complete teams uninstall"
Write-Host "Removing Bloatware"
foreach ($Bloat in $Bloatware) {
Get-AppxPackage "*$Bloat*" | Remove-AppxPackage
Get-AppxProvisionedPackage -Online | Where-Object DisplayName -like "*$Bloat*" | Remove-AppxProvisionedPackage -Online
Get-AppxPackage "*$Bloat*" | Remove-AppxPackage -ErrorAction SilentlyContinue
Get-AppxProvisionedPackage -Online | Where-Object DisplayName -like "*$Bloat*" | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue
Write-Host "Trying to remove $Bloat."
}
@ -1359,7 +1362,7 @@ $WPFtweaksbutton.Add_Click({
Write-Host -Object "Attempting to uninstall: [$($_.Name)]..."
Try {
$Null = $_ | Uninstall-Package -AllVersions -Force -ErrorAction Stop
$Null = $_ | Uninstall-Package -AllVersions -Force -ErrorAction SilentlyContinue
Write-Host -Object "Successfully uninstalled: [$($_.Name)]"
}
Catch {