mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-02-06 16:00:10 +00:00
Compare commits
9 Commits
f3c3613d26
...
cfaf139a6a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cfaf139a6a | ||
|
|
becfba603d | ||
|
|
2b68976e7b | ||
|
|
5369d9d99b | ||
|
|
8b3e1280df | ||
|
|
ce77be324b | ||
|
|
6168e93d4c | ||
|
|
d98118e322 | ||
|
|
f69f107d9d |
@@ -9,7 +9,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Check if PR was merged
|
- name: Check if PR was merged
|
||||||
if: github.event.pull_request.merged == true
|
if: github.event.pull_request.merged == true
|
||||||
|
|||||||
2
.github/workflows/compile-check.yaml
vendored
2
.github/workflows/compile-check.yaml
vendored
@@ -13,7 +13,7 @@ jobs:
|
|||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Sources
|
- name: Checkout Sources
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Compile and Syntaxcheck winutil.ps1
|
- name: Compile and Syntaxcheck winutil.ps1
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|||||||
2
.github/workflows/pre-release.yaml
vendored
2
.github/workflows/pre-release.yaml
vendored
@@ -14,7 +14,7 @@ jobs:
|
|||||||
CERTIFICATE_BASE64: ${{ secrets.CERTIFICATE_BASE64 }}
|
CERTIFICATE_BASE64: ${{ secrets.CERTIFICATE_BASE64 }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Compile project
|
- name: Compile project
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|||||||
2
.github/workflows/remove-winutil.yaml
vendored
2
.github/workflows/remove-winutil.yaml
vendored
@@ -11,7 +11,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Check if winutil.ps1 exists
|
- name: Check if winutil.ps1 exists
|
||||||
id: check_existence
|
id: check_existence
|
||||||
|
|||||||
2
.github/workflows/sponsors.yaml
vendored
2
.github/workflows/sponsors.yaml
vendored
@@ -11,7 +11,7 @@ jobs:
|
|||||||
if: (github.event_name == 'schedule' && github.repository == 'ChrisTitusTech/winutil') || (github.event_name != 'schedule')
|
if: (github.event_name == 'schedule' && github.repository == 'ChrisTitusTech/winutil') || (github.event_name != 'schedule')
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout 🛎️
|
- name: Checkout 🛎️
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Generate Sponsors 💖
|
- name: Generate Sponsors 💖
|
||||||
uses: JamesIves/github-sponsors-readme-action@v1
|
uses: JamesIves/github-sponsors-readme-action@v1
|
||||||
|
|||||||
4
.github/workflows/unittests.yaml
vendored
4
.github/workflows/unittests.yaml
vendored
@@ -8,7 +8,7 @@ jobs:
|
|||||||
name: PS Script Analyzer
|
name: PS Script Analyzer
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- name: lint
|
- name: lint
|
||||||
uses: devblackops/github-action-psscriptanalyzer@master
|
uses: devblackops/github-action-psscriptanalyzer@master
|
||||||
with:
|
with:
|
||||||
@@ -22,7 +22,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Install Pester
|
- name: Install Pester
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ irm "https://christitus.com/win" | iex
|
|||||||
irm "https://christitus.com/windev" | iex
|
irm "https://christitus.com/windev" | iex
|
||||||
```
|
```
|
||||||
|
|
||||||
If you have Issues, refer to [Known Issues](https://winutil.christitus.com/knownissues/)
|
If you have Issues, refer to [Known Issues](https://winutil.christitus.com/knownissues/) or [Create Issue](https://github.com/ChrisTitusTech/winutil/issues)
|
||||||
|
|
||||||
## 🎓 Documentation
|
## 🎓 Documentation
|
||||||
|
|
||||||
|
|||||||
@@ -2927,5 +2927,13 @@
|
|||||||
"description": "The modern, privacy-focused, performance-driven browser built on Firefox",
|
"description": "The modern, privacy-focused, performance-driven browser built on Firefox",
|
||||||
"link": "https://zen-browser.app/",
|
"link": "https://zen-browser.app/",
|
||||||
"winget": "Zen-Team.Zen-Browser"
|
"winget": "Zen-Team.Zen-Browser"
|
||||||
|
},
|
||||||
|
"Zed": {
|
||||||
|
"category": "Development",
|
||||||
|
"choco": "na",
|
||||||
|
"content": "Zed",
|
||||||
|
"description": "Zed is a modern, high-performance code editor designed from the ground up for speed and collaboration.",
|
||||||
|
"link": "https://zed.dev/",
|
||||||
|
"winget": "Zed.Zed"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1673,13 +1673,6 @@
|
|||||||
"Value": "0",
|
"Value": "0",
|
||||||
"OriginalValue": "<RemoveEntry>"
|
"OriginalValue": "<RemoveEntry>"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
|
||||||
"Name": "CryptoWalletEnabled",
|
|
||||||
"Type": "DWord",
|
|
||||||
"Value": "0",
|
|
||||||
"OriginalValue": "<RemoveEntry>"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
||||||
"Name": "WalletDonationEnabled",
|
"Name": "WalletDonationEnabled",
|
||||||
@@ -2328,6 +2321,7 @@
|
|||||||
"Microsoft.ZuneMusic",
|
"Microsoft.ZuneMusic",
|
||||||
"Microsoft.ZuneVideo",
|
"Microsoft.ZuneVideo",
|
||||||
"Microsoft.MicrosoftOfficeHub",
|
"Microsoft.MicrosoftOfficeHub",
|
||||||
|
"MsTeams",
|
||||||
"*EclipseManager*",
|
"*EclipseManager*",
|
||||||
"*ActiproSoftwareLLC*",
|
"*ActiproSoftwareLLC*",
|
||||||
"*AdobeSystemsIncorporated.AdobePhotoshopExpress*",
|
"*AdobeSystemsIncorporated.AdobePhotoshopExpress*",
|
||||||
@@ -2357,38 +2351,15 @@
|
|||||||
],
|
],
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"
|
||||||
$TeamsPath = [System.IO.Path]::Combine($env:LOCALAPPDATA, 'Microsoft', 'Teams')
|
$TeamsPath = \"$Env:LocalAppData\\Microsoft\\Teams\\Update.exe\"
|
||||||
$TeamsUpdateExePath = [System.IO.Path]::Combine($TeamsPath, 'Update.exe')
|
|
||||||
|
|
||||||
Write-Host \"Stopping Teams process...\"
|
if (Test-Path $TeamsPath) {
|
||||||
Stop-Process -Name \"*teams*\" -Force -ErrorAction SilentlyContinue
|
Write-Host \"Uninstalling Teams\"
|
||||||
|
Start-Process $TeamsPath -ArgumentList -uninstall -wait
|
||||||
Write-Host \"Uninstalling Teams from AppData\\Microsoft\\Teams\"
|
|
||||||
if ([System.IO.File]::Exists($TeamsUpdateExePath)) {
|
|
||||||
# Uninstall app
|
|
||||||
$proc = Start-Process $TeamsUpdateExePath \"-uninstall -s\" -PassThru
|
|
||||||
$proc.WaitForExit()
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host \"Removing Teams AppxPackage...\"
|
|
||||||
Get-AppxPackage \"*Teams*\" | Remove-AppxPackage -ErrorAction SilentlyContinue
|
|
||||||
Get-AppxPackage \"*Teams*\" -AllUsers | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue
|
|
||||||
|
|
||||||
Write-Host \"Deleting Teams directory\"
|
Write-Host \"Deleting Teams directory\"
|
||||||
if ([System.IO.Directory]::Exists($TeamsPath)) {
|
Remove-Item $TeamsPath -Recurse -Force
|
||||||
Remove-Item $TeamsPath -Force -Recurse -ErrorAction SilentlyContinue
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host \"Deleting Teams uninstall registry key\"
|
|
||||||
# Uninstall from Uninstall registry key UninstallString
|
|
||||||
$us = (Get-ChildItem -Path HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall, HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall | Get-ItemProperty | Where-Object { $_.DisplayName -like '*Teams*'}).UninstallString
|
|
||||||
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()
|
|
||||||
}
|
|
||||||
"
|
"
|
||||||
],
|
],
|
||||||
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/debloat"
|
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/debloat"
|
||||||
|
|||||||
@@ -21,10 +21,6 @@ function Invoke-WinUtilTweaks {
|
|||||||
$KeepServiceStartup = $true
|
$KeepServiceStartup = $true
|
||||||
)
|
)
|
||||||
|
|
||||||
if ($Checkbox -like "*Toggle*") {
|
|
||||||
$CheckBox = $sync.configs.tweaks.$CheckBox
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Debug "Tweaks: $($CheckBox)"
|
Write-Debug "Tweaks: $($CheckBox)"
|
||||||
if($undo) {
|
if($undo) {
|
||||||
$Values = @{
|
$Values = @{
|
||||||
|
|||||||
@@ -24,8 +24,12 @@ Function Set-WinUtilService {
|
|||||||
# Check if the service exists
|
# Check if the service exists
|
||||||
$service = Get-Service -Name $Name -ErrorAction Stop
|
$service = Get-Service -Name $Name -ErrorAction Stop
|
||||||
|
|
||||||
# Service exists, proceed with changing properties
|
# Service exists, proceed with changing properties -- while handling auto delayed start for PWSH 5
|
||||||
$service | Set-Service -StartupType $StartupType -ErrorAction Stop
|
if (($PSVersionTable.PSVersion.Major -lt 7) -and ($StartupType -eq "AutomaticDelayedStart")) {
|
||||||
|
sc.exe config $Name start=delayed-auto
|
||||||
|
} else {
|
||||||
|
$service | Set-Service -StartupType $StartupType -ErrorAction Stop
|
||||||
|
}
|
||||||
} catch [System.ServiceProcess.ServiceNotFoundException] {
|
} catch [System.ServiceProcess.ServiceNotFoundException] {
|
||||||
Write-Warning "Service $Name was not found"
|
Write-Warning "Service $Name was not found"
|
||||||
} catch {
|
} catch {
|
||||||
|
|||||||
@@ -156,6 +156,7 @@ function Invoke-WPFUIElements {
|
|||||||
$checkBox.Name = $entryInfo.Name
|
$checkBox.Name = $entryInfo.Name
|
||||||
$checkBox.HorizontalAlignment = "Right"
|
$checkBox.HorizontalAlignment = "Right"
|
||||||
$checkBox.UseLayoutRounding = $true
|
$checkBox.UseLayoutRounding = $true
|
||||||
|
[System.Windows.Automation.AutomationProperties]::SetName($checkBox, $entryInfo.Content)
|
||||||
$dockPanel.Children.Add($checkBox) | Out-Null
|
$dockPanel.Children.Add($checkBox) | Out-Null
|
||||||
$checkBox.Style = $ColorfulToggleSwitchStyle
|
$checkBox.Style = $ColorfulToggleSwitchStyle
|
||||||
|
|
||||||
@@ -191,6 +192,7 @@ function Invoke-WPFUIElements {
|
|||||||
$toggleButton.ToolTip = $entryInfo.Description
|
$toggleButton.ToolTip = $entryInfo.Description
|
||||||
$toggleButton.HorizontalAlignment = "Left"
|
$toggleButton.HorizontalAlignment = "Left"
|
||||||
$toggleButton.Style = $ToggleButtonStyle
|
$toggleButton.Style = $ToggleButtonStyle
|
||||||
|
[System.Windows.Automation.AutomationProperties]::SetName($toggleButton, $entryInfo.Content[0])
|
||||||
|
|
||||||
$toggleButton.Tag = @{
|
$toggleButton.Tag = @{
|
||||||
contentOn = if ($entryInfo.Content.Count -ge 1) { $entryInfo.Content[0] } else { "" }
|
contentOn = if ($entryInfo.Content.Count -ge 1) { $entryInfo.Content[0] } else { "" }
|
||||||
@@ -232,6 +234,7 @@ function Invoke-WPFUIElements {
|
|||||||
$comboBox.SetResourceReference([Windows.Controls.Control]::MarginProperty, "ButtonMargin")
|
$comboBox.SetResourceReference([Windows.Controls.Control]::MarginProperty, "ButtonMargin")
|
||||||
$comboBox.SetResourceReference([Windows.Controls.Control]::FontSizeProperty, "ButtonFontSize")
|
$comboBox.SetResourceReference([Windows.Controls.Control]::FontSizeProperty, "ButtonFontSize")
|
||||||
$comboBox.UseLayoutRounding = $true
|
$comboBox.UseLayoutRounding = $true
|
||||||
|
[System.Windows.Automation.AutomationProperties]::SetName($comboBox, $entryInfo.Content)
|
||||||
|
|
||||||
foreach ($comboitem in ($entryInfo.ComboItems -split " ")) {
|
foreach ($comboitem in ($entryInfo.ComboItems -split " ")) {
|
||||||
$comboBoxItem = New-Object Windows.Controls.ComboBoxItem
|
$comboBoxItem = New-Object Windows.Controls.ComboBoxItem
|
||||||
@@ -273,6 +276,7 @@ function Invoke-WPFUIElements {
|
|||||||
$baseWidth = [int]$entryInfo.ButtonWidth
|
$baseWidth = [int]$entryInfo.ButtonWidth
|
||||||
$button.Width = [math]::Max($baseWidth, 350)
|
$button.Width = [math]::Max($baseWidth, 350)
|
||||||
}
|
}
|
||||||
|
[System.Windows.Automation.AutomationProperties]::SetName($button, $entryInfo.Content)
|
||||||
$itemsControl.Items.Add($button) | Out-Null
|
$itemsControl.Items.Add($button) | Out-Null
|
||||||
|
|
||||||
$sync[$entryInfo.Name] = $button
|
$sync[$entryInfo.Name] = $button
|
||||||
@@ -303,6 +307,7 @@ function Invoke-WPFUIElements {
|
|||||||
$radioButton.SetResourceReference([Windows.Controls.Control]::FontSizeProperty, "ButtonFontSize")
|
$radioButton.SetResourceReference([Windows.Controls.Control]::FontSizeProperty, "ButtonFontSize")
|
||||||
$radioButton.ToolTip = $entryInfo.Description
|
$radioButton.ToolTip = $entryInfo.Description
|
||||||
$radioButton.UseLayoutRounding = $true
|
$radioButton.UseLayoutRounding = $true
|
||||||
|
[System.Windows.Automation.AutomationProperties]::SetName($radioButton, $entryInfo.Content)
|
||||||
|
|
||||||
if ($entryInfo.Checked -eq $true) {
|
if ($entryInfo.Checked -eq $true) {
|
||||||
$radioButton.IsChecked = $true
|
$radioButton.IsChecked = $true
|
||||||
@@ -324,6 +329,7 @@ function Invoke-WPFUIElements {
|
|||||||
$checkBox.ToolTip = $entryInfo.Description
|
$checkBox.ToolTip = $entryInfo.Description
|
||||||
$checkBox.SetResourceReference([Windows.Controls.Control]::MarginProperty, "CheckBoxMargin")
|
$checkBox.SetResourceReference([Windows.Controls.Control]::MarginProperty, "CheckBoxMargin")
|
||||||
$checkBox.UseLayoutRounding = $true
|
$checkBox.UseLayoutRounding = $true
|
||||||
|
[System.Windows.Automation.AutomationProperties]::SetName($checkBox, $entryInfo.Content)
|
||||||
if ($entryInfo.Checked -eq $true) {
|
if ($entryInfo.Checked -eq $true) {
|
||||||
$checkBox.IsChecked = $entryInfo.Checked
|
$checkBox.IsChecked = $entryInfo.Checked
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user