mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-22 14:01:31 -06:00
Test (#318)
* 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:
parent
428f340f23
commit
1d96e8a96c
@ -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="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="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="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="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="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."/>
|
<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."/>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#for CI/CD
|
#for CI/CD
|
||||||
$BranchToUse = 'main'
|
$BranchToUse = 'test'
|
||||||
|
|
||||||
<#
|
<#
|
||||||
.NOTES
|
.NOTES
|
||||||
|
73
winutil.ps1
73
winutil.ps1
@ -1305,48 +1305,51 @@ $WPFtweaksbutton.Add_Click({
|
|||||||
"HPSystemInformation"
|
"HPSystemInformation"
|
||||||
)
|
)
|
||||||
|
|
||||||
## Teams Removal
|
## Teams Removal - Source: https://github.com/asheroto/UninstallTeams
|
||||||
# Remove Teams Machine-Wide Installer
|
function getUninstallString($match) {
|
||||||
Write-Host "Removing Teams Machine-wide Installer" -ForegroundColor Yellow
|
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
|
||||||
$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)
|
|
||||||
}
|
}
|
||||||
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"
|
Write-Output "Deleting Teams uninstall registry key"
|
||||||
# Process all the Users
|
# Uninstall from Uninstall registry key UninstallString
|
||||||
$Users | ForEach-Object {
|
$us = getUninstallString("Teams");
|
||||||
Write-Host "Process user: $($_.Name)" -ForegroundColor Yellow
|
if ($us.Length -gt 0) {
|
||||||
#Locate installation folder
|
$us = ($us.Replace("/I", "/uninstall ") + " /quiet").Replace(" ", " ")
|
||||||
$localAppData = "$($ENV:SystemDrive)\Users\$($_.Name)\AppData\Local\Microsoft\Teams"
|
$FilePath = ($us.Substring(0, $us.IndexOf(".exe") + 4).Trim())
|
||||||
$programData = "$($env:ProgramData)\$($_.Name)\Microsoft\Teams"
|
$ProcessArgs = ($us.Substring($us.IndexOf(".exe") + 5).Trim().replace(" ", " "))
|
||||||
If (Test-Path "$($localAppData)\Current\Teams.exe") {
|
$proc = Start-Process -FilePath $FilePath -Args $ProcessArgs -PassThru
|
||||||
unInstallTeams($localAppData)
|
$proc.WaitForExit()
|
||||||
}
|
}
|
||||||
elseif (Test-Path "$($programData)\Current\Teams.exe") {
|
|
||||||
unInstallTeams($programData)
|
Write-Output "Restart computer to complete teams uninstall"
|
||||||
}
|
|
||||||
else {
|
|
||||||
Write-Warning "Teams installation not found for user $($_.Name)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cmd /c winget uninstall -h "Microsoft Teams"
|
|
||||||
|
|
||||||
Write-Host "Removing Bloatware"
|
Write-Host "Removing Bloatware"
|
||||||
|
|
||||||
foreach ($Bloat in $Bloatware) {
|
foreach ($Bloat in $Bloatware) {
|
||||||
Get-AppxPackage "*$Bloat*" | Remove-AppxPackage
|
Get-AppxPackage "*$Bloat*" | Remove-AppxPackage -ErrorAction SilentlyContinue
|
||||||
Get-AppxProvisionedPackage -Online | Where-Object DisplayName -like "*$Bloat*" | Remove-AppxProvisionedPackage -Online
|
Get-AppxProvisionedPackage -Online | Where-Object DisplayName -like "*$Bloat*" | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue
|
||||||
Write-Host "Trying to remove $Bloat."
|
Write-Host "Trying to remove $Bloat."
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1359,7 +1362,7 @@ $WPFtweaksbutton.Add_Click({
|
|||||||
Write-Host -Object "Attempting to uninstall: [$($_.Name)]..."
|
Write-Host -Object "Attempting to uninstall: [$($_.Name)]..."
|
||||||
|
|
||||||
Try {
|
Try {
|
||||||
$Null = $_ | Uninstall-Package -AllVersions -Force -ErrorAction Stop
|
$Null = $_ | Uninstall-Package -AllVersions -Force -ErrorAction SilentlyContinue
|
||||||
Write-Host -Object "Successfully uninstalled: [$($_.Name)]"
|
Write-Host -Object "Successfully uninstalled: [$($_.Name)]"
|
||||||
}
|
}
|
||||||
Catch {
|
Catch {
|
||||||
|
Loading…
Reference in New Issue
Block a user