mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-02-04 15:00:09 +00:00
Compare commits
39 Commits
25.11.17
...
80c15557d4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80c15557d4 | ||
|
|
a587bc60c4 | ||
|
|
c71fad54dc | ||
|
|
4eb76a9099 | ||
|
|
95d8660b3a | ||
|
|
4bd25e62e1 | ||
|
|
da6b105573 | ||
|
|
64022cc08d | ||
|
|
401f7f384a | ||
|
|
e2efb3a483 | ||
|
|
4dc0fd6a6e | ||
|
|
f671ad4518 | ||
|
|
c2cb00fc68 | ||
|
|
7503444e2b | ||
|
|
80ab6ba005 | ||
|
|
2e0073af75 | ||
|
|
3cb0a4b664 | ||
|
|
e9b40ae710 | ||
|
|
408327daec | ||
|
|
7f7424406f | ||
|
|
ccc44414a2 | ||
|
|
06ea48dd01 | ||
|
|
5a6b1ef086 | ||
|
|
aba3d786bc | ||
|
|
7765c1032b | ||
|
|
015f1b0709 | ||
|
|
19b6f8abfa | ||
|
|
80e872aa60 | ||
|
|
cfaf139a6a | ||
|
|
becfba603d | ||
|
|
2b68976e7b | ||
|
|
5369d9d99b | ||
|
|
8b3e1280df | ||
|
|
ce77be324b | ||
|
|
6168e93d4c | ||
|
|
d98118e322 | ||
|
|
f69f107d9d | ||
|
|
f3c3613d26 | ||
|
|
b265675560 |
@@ -9,7 +9,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Check if PR was merged
|
||||
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
|
||||
steps:
|
||||
- name: Checkout Sources
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Compile and Syntaxcheck winutil.ps1
|
||||
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 }}
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Compile project
|
||||
shell: pwsh
|
||||
|
||||
2
.github/workflows/remove-winutil.yaml
vendored
2
.github/workflows/remove-winutil.yaml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Check if winutil.ps1 exists
|
||||
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')
|
||||
steps:
|
||||
- name: Checkout 🛎️
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Generate Sponsors 💖
|
||||
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
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
- name: lint
|
||||
uses: devblackops/github-action-psscriptanalyzer@master
|
||||
with:
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install Pester
|
||||
run: |
|
||||
|
||||
@@ -35,7 +35,7 @@ irm "https://christitus.com/win" | 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
|
||||
|
||||
@@ -79,7 +79,7 @@ You'll see a new file named `winutil.ps1`, which's created by `Compile.ps1` scri
|
||||
|
||||
These are the sponsors that help keep this project alive with monthly contributions.
|
||||
|
||||
<!-- sponsors --><a href="https://github.com/markamos"><img src="https://github.com/markamos.png" width="60px" alt="User avatar: Mark Amos" /></a><a href="https://github.com/dwelfusius"><img src="https://github.com/dwelfusius.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/mews-se"><img src="https://github.com/mews-se.png" width="60px" alt="User avatar: Martin Stockzell" /></a><a href="https://github.com/jdiegmueller"><img src="https://github.com/jdiegmueller.png" width="60px" alt="User avatar: Jason A. Diegmueller" /></a><a href="https://github.com/robertsandrock"><img src="https://github.com/robertsandrock.png" width="60px" alt="User avatar: RMS" /></a><a href="https://github.com/KenichiQaz"><img src="https://github.com/KenichiQaz.png" width="60px" alt="User avatar: Stefan" /></a><a href="https://github.com/paulsheets"><img src="https://github.com/paulsheets.png" width="60px" alt="User avatar: Paul" /></a><a href="https://github.com/djones369"><img src="https://github.com/djones369.png" width="60px" alt="User avatar: Dave J (WhamGeek)" /></a><a href="https://github.com/anthonymendez"><img src="https://github.com/anthonymendez.png" width="60px" alt="User avatar: Anthony Mendez" /></a><a href="https://github.com/FatBastard0"><img src="https://github.com/FatBastard0.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/DursleyGuy"><img src="https://github.com/DursleyGuy.png" width="60px" alt="User avatar: DursleyGuy" /></a><a href="https://github.com/realmuddy"><img src="https://github.com/realmuddy.png" width="60px" alt="User avatar: Phillip Waters" /></a><a href="https://github.com/quaszi"><img src="https://github.com/quaszi.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/DwayneTheRockLobster1"><img src="https://github.com/DwayneTheRockLobster1.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/KieraKujisawa"><img src="https://github.com/KieraKujisawa.png" width="60px" alt="User avatar: Kiera Meredith" /></a><a href="https://github.com/novello-dev"><img src="https://github.com/novello-dev.png" width="60px" alt="User avatar: João Pedro Novello" /></a><!-- sponsors -->
|
||||
<!-- sponsors --><a href="https://github.com/markamos"><img src="https://github.com/markamos.png" width="60px" alt="User avatar: Mark Amos" /></a><a href="https://github.com/dwelfusius"><img src="https://github.com/dwelfusius.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/mews-se"><img src="https://github.com/mews-se.png" width="60px" alt="User avatar: Martin Stockzell" /></a><a href="https://github.com/jdiegmueller"><img src="https://github.com/jdiegmueller.png" width="60px" alt="User avatar: Jason A. Diegmueller" /></a><a href="https://github.com/robertsandrock"><img src="https://github.com/robertsandrock.png" width="60px" alt="User avatar: RMS" /></a><a href="https://github.com/KenichiQaz"><img src="https://github.com/KenichiQaz.png" width="60px" alt="User avatar: Stefan" /></a><a href="https://github.com/paulsheets"><img src="https://github.com/paulsheets.png" width="60px" alt="User avatar: Paul" /></a><a href="https://github.com/djones369"><img src="https://github.com/djones369.png" width="60px" alt="User avatar: Dave J (WhamGeek)" /></a><a href="https://github.com/anthonymendez"><img src="https://github.com/anthonymendez.png" width="60px" alt="User avatar: Anthony Mendez" /></a><a href="https://github.com/FatBastard0"><img src="https://github.com/FatBastard0.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/DursleyGuy"><img src="https://github.com/DursleyGuy.png" width="60px" alt="User avatar: DursleyGuy" /></a><a href="https://github.com/quaszi"><img src="https://github.com/quaszi.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/DwayneTheRockLobster1"><img src="https://github.com/DwayneTheRockLobster1.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/KieraKujisawa"><img src="https://github.com/KieraKujisawa.png" width="60px" alt="User avatar: Kiera Meredith" /></a><a href="https://github.com/TaNorbs"><img src="https://github.com/TaNorbs.png" width="60px" alt="User avatar: Norbs" /></a><!-- sponsors -->
|
||||
|
||||
## 🏅 Thanks to all Contributors
|
||||
Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻.
|
||||
|
||||
@@ -1000,6 +1000,14 @@
|
||||
"link": "https://aws.amazon.com/corretto",
|
||||
"winget": "Amazon.Corretto.21.JDK"
|
||||
},
|
||||
"java25": {
|
||||
"category": "Development",
|
||||
"choco": "corretto25jdk",
|
||||
"content": "Amazon Corretto 25 (LTS)",
|
||||
"description": "Amazon Corretto is a no-cost, multiplatform, production-ready distribution of the Open Java Development Kit (OpenJDK).",
|
||||
"link": "https://aws.amazon.com/corretto",
|
||||
"winget": "Amazon.Corretto.25.JDK"
|
||||
},
|
||||
"jdownloader": {
|
||||
"category": "Utilities",
|
||||
"choco": "jdownloader",
|
||||
@@ -2927,5 +2935,13 @@
|
||||
"description": "The modern, privacy-focused, performance-driven browser built on Firefox",
|
||||
"link": "https://zen-browser.app/",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,9 @@
|
||||
"WPFTweaksConsumerFeatures",
|
||||
"WPFTweaksDisableExplorerAutoDiscovery",
|
||||
"WPFTweaksDVR",
|
||||
"WPFTweaksLoc",
|
||||
"WPFTweaksLocation",
|
||||
"WPFTweaksServices",
|
||||
"WPFTweaksStorage",
|
||||
"WPFTweaksTele",
|
||||
"WPFTweaksWifi",
|
||||
"WPFTweaksDiskCleanup",
|
||||
"WPFTweaksDeleteTempFiles",
|
||||
"WPFTweaksEndTaskOnTaskbar",
|
||||
|
||||
1009
config/tweaks.json
1009
config/tweaks.json
File diff suppressed because it is too large
Load Diff
@@ -21,10 +21,6 @@ function Invoke-WinUtilTweaks {
|
||||
$KeepServiceStartup = $true
|
||||
)
|
||||
|
||||
if ($Checkbox -like "*Toggle*") {
|
||||
$CheckBox = $sync.configs.tweaks.$CheckBox
|
||||
}
|
||||
|
||||
Write-Debug "Tweaks: $($CheckBox)"
|
||||
if($undo) {
|
||||
$Values = @{
|
||||
|
||||
@@ -24,8 +24,12 @@ Function Set-WinUtilService {
|
||||
# Check if the service exists
|
||||
$service = Get-Service -Name $Name -ErrorAction Stop
|
||||
|
||||
# Service exists, proceed with changing properties
|
||||
$service | Set-Service -StartupType $StartupType -ErrorAction Stop
|
||||
# Service exists, proceed with changing properties -- while handling auto delayed start for PWSH 5
|
||||
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] {
|
||||
Write-Warning "Service $Name was not found"
|
||||
} catch {
|
||||
|
||||
@@ -33,62 +33,6 @@ function Invoke-WPFInstall {
|
||||
try {
|
||||
$sync.ProcessRunning = $true
|
||||
if($packagesWinget.Count -gt 0 -and $packagesWinget -ne "0") {
|
||||
Add-Type -AssemblyName System.DirectoryServices.AccountManagement
|
||||
Add-Type -assembly System.Windows.Forms
|
||||
$PrincipalContext = New-Object System.DirectoryServices.AccountManagement.PrincipalContext('Machine')
|
||||
$user = $env:USERNAME
|
||||
|
||||
Get-LocalUser | Where-Object Enabled -eq $true | ForEach-Object {
|
||||
$validPassword = $false
|
||||
while (-not $validPassword) {
|
||||
try {
|
||||
$myPasswordIsBlank = $PrincipalContext.ValidateCredentials($user, $null)
|
||||
$validPassword = $true
|
||||
} catch {
|
||||
$form = New-Object System.Windows.Forms.Form
|
||||
$form.Text = "Set password for $user"
|
||||
$form.Size = New-Object System.Drawing.Size(500, 200)
|
||||
|
||||
$label = New-Object System.Windows.Forms.Label
|
||||
$label.Text = 'Admin mode install failed. Set a USER password for login and user-based installation.'
|
||||
$label.Size = New-Object System.Drawing.Size(480, 60)
|
||||
$label.Location = New-Object System.Drawing.Point(10, 10)
|
||||
$form.Controls.Add($label)
|
||||
|
||||
$passwordBox = New-Object System.Windows.Forms.TextBox
|
||||
$passwordBox.Size = New-Object System.Drawing.Size(380, 20)
|
||||
$passwordBox.UseSystemPasswordChar = $true
|
||||
$passwordBox.Location = New-Object System.Drawing.Point(10, 125)
|
||||
$form.Controls.Add($passwordBox)
|
||||
|
||||
$button = New-Object System.Windows.Forms.Button
|
||||
$button.Text = 'Submit'
|
||||
$button.Size = New-Object System.Drawing.Size(75, 23)
|
||||
$button.Location = New-Object System.Drawing.Point(400, 125)
|
||||
$button.Add_Click({
|
||||
$password = $passwordBox.Text | ConvertTo-SecureString -AsPlainText -Force
|
||||
if ($password) {
|
||||
try {
|
||||
Set-LocalUser -Name $user -Password $password
|
||||
$validPassword = $PrincipalContext.ValidateCredentials($user, $passwordBox.Text)
|
||||
if ($validPassword) {
|
||||
$form.Close()
|
||||
} else {
|
||||
[System.Windows.Forms.MessageBox]::Show('Invalid password! Please try again.')
|
||||
}
|
||||
} catch {
|
||||
[System.Windows.Forms.MessageBox]::Show('Error setting password!')
|
||||
}
|
||||
} else {
|
||||
[System.Windows.Forms.MessageBox]::Show('No password entered!')
|
||||
}
|
||||
})
|
||||
$form.Controls.Add($button)
|
||||
$form.ShowDialog() | Out-Null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Show-WPFInstallAppBusy -text "Installing apps..."
|
||||
Install-WinUtilWinget
|
||||
Install-WinUtilProgramWinget -Action Install -Programs $packagesWinget
|
||||
|
||||
@@ -156,6 +156,7 @@ function Invoke-WPFUIElements {
|
||||
$checkBox.Name = $entryInfo.Name
|
||||
$checkBox.HorizontalAlignment = "Right"
|
||||
$checkBox.UseLayoutRounding = $true
|
||||
[System.Windows.Automation.AutomationProperties]::SetName($checkBox, $entryInfo.Content)
|
||||
$dockPanel.Children.Add($checkBox) | Out-Null
|
||||
$checkBox.Style = $ColorfulToggleSwitchStyle
|
||||
|
||||
@@ -191,6 +192,7 @@ function Invoke-WPFUIElements {
|
||||
$toggleButton.ToolTip = $entryInfo.Description
|
||||
$toggleButton.HorizontalAlignment = "Left"
|
||||
$toggleButton.Style = $ToggleButtonStyle
|
||||
[System.Windows.Automation.AutomationProperties]::SetName($toggleButton, $entryInfo.Content[0])
|
||||
|
||||
$toggleButton.Tag = @{
|
||||
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]::FontSizeProperty, "ButtonFontSize")
|
||||
$comboBox.UseLayoutRounding = $true
|
||||
[System.Windows.Automation.AutomationProperties]::SetName($comboBox, $entryInfo.Content)
|
||||
|
||||
foreach ($comboitem in ($entryInfo.ComboItems -split " ")) {
|
||||
$comboBoxItem = New-Object Windows.Controls.ComboBoxItem
|
||||
@@ -273,6 +276,7 @@ function Invoke-WPFUIElements {
|
||||
$baseWidth = [int]$entryInfo.ButtonWidth
|
||||
$button.Width = [math]::Max($baseWidth, 350)
|
||||
}
|
||||
[System.Windows.Automation.AutomationProperties]::SetName($button, $entryInfo.Content)
|
||||
$itemsControl.Items.Add($button) | Out-Null
|
||||
|
||||
$sync[$entryInfo.Name] = $button
|
||||
@@ -303,6 +307,7 @@ function Invoke-WPFUIElements {
|
||||
$radioButton.SetResourceReference([Windows.Controls.Control]::FontSizeProperty, "ButtonFontSize")
|
||||
$radioButton.ToolTip = $entryInfo.Description
|
||||
$radioButton.UseLayoutRounding = $true
|
||||
[System.Windows.Automation.AutomationProperties]::SetName($radioButton, $entryInfo.Content)
|
||||
|
||||
if ($entryInfo.Checked -eq $true) {
|
||||
$radioButton.IsChecked = $true
|
||||
@@ -324,6 +329,7 @@ function Invoke-WPFUIElements {
|
||||
$checkBox.ToolTip = $entryInfo.Description
|
||||
$checkBox.SetResourceReference([Windows.Controls.Control]::MarginProperty, "CheckBoxMargin")
|
||||
$checkBox.UseLayoutRounding = $true
|
||||
[System.Windows.Automation.AutomationProperties]::SetName($checkBox, $entryInfo.Content)
|
||||
if ($entryInfo.Checked -eq $true) {
|
||||
$checkBox.IsChecked = $entryInfo.Checked
|
||||
}
|
||||
|
||||
@@ -451,13 +451,11 @@ $NavLogoPanel.Children.Add((Invoke-WinUtilAssets -Type "logo" -Size 25)) | Out-N
|
||||
$winutildir = @{}
|
||||
|
||||
# Set the path for the winutil directory
|
||||
$winutildir["path"] = "$env:LOCALAPPDATA\winutil\"
|
||||
[System.IO.Directory]::CreateDirectory($winutildir["path"]) | Out-Null
|
||||
$winutildir = "$env:LocalAppData\winutil\"
|
||||
New-Item $winutildir -ItemType Directory -Force | Out-Null
|
||||
|
||||
$winutildir["logo.ico"] = $winutildir["path"] + "cttlogo.ico"
|
||||
|
||||
if (Test-Path $winutildir["logo.ico"]) {
|
||||
$sync["logorender"] = $winutildir["logo.ico"]
|
||||
if (Test-Path "$winutildir\logo.ico") {
|
||||
$sync["logorender"] = "$winutildir\logo.ico"
|
||||
} else {
|
||||
$sync["logorender"] = (Invoke-WinUtilAssets -Type "Logo" -Size 90 -Render)
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:
|
||||
$dateTime = Get-Date -Format "yyyy-MM-dd_HH-mm-ss"
|
||||
|
||||
$logdir = "$env:localappdata\winutil\logs"
|
||||
[System.IO.Directory]::CreateDirectory("$logdir") | Out-Null
|
||||
New-Item $logdir -ItemType Directory -Force | Out-Null
|
||||
Start-Transcript -Path "$logdir\winutil_$dateTime.log" -Append -NoClobber | Out-Null
|
||||
|
||||
# Set PowerShell window title
|
||||
|
||||
Reference in New Issue
Block a user