mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-04-06 06:38:31 +00:00
Compare commits
6 Commits
72ad35bbd8
...
nullsafe-i
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b481064437 | ||
|
|
d2dbf03572 | ||
|
|
88c68fd411 | ||
|
|
e82aaf03f0 | ||
|
|
9a77fed09b | ||
|
|
336ac6fb8f |
34
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
34
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
@@ -6,9 +6,6 @@ body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
# 🐞 **Issue Report**
|
||||
Thank you for taking the time to report an issue! Please provide as much detail as possible to help us address the problem efficiently.
|
||||
|
||||
## ⚠️ **IMPORTANT**
|
||||
- 🛠️ **Supported environments only:** We only support Windows 11.
|
||||
- 💡 For general questions, use the [Discussions section](https://github.com/Christitustech/winutil/discussions) or join our Community-driven [Discord Server](https://discord.gg/RUbZUZyByQ).
|
||||
@@ -24,11 +21,16 @@ body:
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
- type: dropdown
|
||||
id: affected_part
|
||||
attributes:
|
||||
label: 📜 What part of Winutil are you having issues with?
|
||||
placeholder: "e.g., Tweaks, etc."
|
||||
label: What part of Winutil are you having issues with?
|
||||
options:
|
||||
- Program Install Tab
|
||||
- Tweaks Tab
|
||||
- Config Tab
|
||||
- Updates Tab
|
||||
- Win11 Creator Tab
|
||||
validations:
|
||||
required: true
|
||||
|
||||
@@ -39,24 +41,8 @@ body:
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: steps_to_reproduce
|
||||
attributes:
|
||||
label: 🔄 Steps to reproduce the issue.
|
||||
placeholder: "e.g., Step 1: ..., Step 2: ..."
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: error_output
|
||||
attributes:
|
||||
label: ❌ Paste the full error output (if available).
|
||||
placeholder: "Include any relevant logs or error messages."
|
||||
|
||||
- type: textarea
|
||||
id: additional_context
|
||||
attributes:
|
||||
label: 🖼️ Additional context.
|
||||
placeholder: "Include screenshots, code blocks (use triple backticks ```), or any other relevant information."
|
||||
validations:
|
||||
required: false
|
||||
label: ❌ Paste the full error output (if available) or Screenshot.
|
||||
placeholder: "Include any relevant logs or error messages."
|
||||
39
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
39
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
@@ -13,45 +13,10 @@ body:
|
||||
- 🛠️ **Supported environments only:** We only support Windows 11.
|
||||
- 💡 For general questions, use the [Discussions section](https://github.com/Christitustech/winutil/discussions) or join our Community-driven [Discord Server](https://discord.gg/RUbZUZyByQ).
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: ⚙️ Issue Checklist
|
||||
options:
|
||||
- label: I have read the guidelines.
|
||||
- label: I checked for duplicate issues.
|
||||
- label: I searched for existing discussions.
|
||||
- label: I checked for an existing pull request that addresses this request.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: problem_statement
|
||||
attributes:
|
||||
label: ❓ Is your feature request related to a problem?
|
||||
placeholder: "Provide a clear and concise description of the issue you're facing. Example: 'I'm always frustrated when [...]'"
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: proposed_solution
|
||||
attributes:
|
||||
label: 💡 Describe the solution you'd like
|
||||
placeholder: "Provide a clear and concise description of what you want to happen."
|
||||
placeholder: "Provide a clear and concise description."
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: alternatives
|
||||
attributes:
|
||||
label: 🔄 Describe alternatives you've considered
|
||||
placeholder: "Provide details on any alternative solutions or features you've thought about."
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: additional_context
|
||||
attributes:
|
||||
label: 🖼️ Additional context
|
||||
placeholder: "Include screenshots, code blocks (use triple backticks ```), or any other relevant information."
|
||||
validations:
|
||||
required: false
|
||||
required: true
|
||||
@@ -16,13 +16,20 @@ function Invoke-WinUtilFeatureInstall {
|
||||
Write-Host "Installing $feature"
|
||||
Enable-WindowsOptionalFeature -Online -FeatureName $feature -All -NoRestart
|
||||
} catch {
|
||||
if ($CheckBox.Exception.Message -like "*requires elevation*") {
|
||||
if ($_.Exception -and $_.Exception.Message -like "*requires elevation*") {
|
||||
Write-Warning "Unable to Install $feature due to permissions. Are you running as admin?"
|
||||
Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "Error" }
|
||||
} else {
|
||||
|
||||
Write-Warning "Unable to Install $feature due to unhandled exception"
|
||||
Write-Warning $CheckBox.Exception.StackTrace
|
||||
if ($_.Exception) {
|
||||
if (-not [string]::IsNullOrWhiteSpace($_.Exception.Message)) {
|
||||
Write-Warning $_.Exception.Message
|
||||
}
|
||||
if (-not [string]::IsNullOrWhiteSpace($_.Exception.StackTrace)) {
|
||||
Write-Warning $_.Exception.StackTrace
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -35,13 +42,20 @@ function Invoke-WinUtilFeatureInstall {
|
||||
Write-Host "Running Script for $CheckBox"
|
||||
Invoke-Command $scriptblock -ErrorAction stop
|
||||
} catch {
|
||||
if ($CheckBox.Exception.Message -like "*requires elevation*") {
|
||||
if ($_.Exception -and $_.Exception.Message -like "*requires elevation*") {
|
||||
Write-Warning "Unable to Install $feature due to permissions. Are you running as admin?"
|
||||
Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "Error" }
|
||||
} else {
|
||||
Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "Error" }
|
||||
Write-Warning "Unable to Install $feature due to unhandled exception"
|
||||
Write-Warning $CheckBox.Exception.StackTrace
|
||||
if ($_.Exception) {
|
||||
if (-not [string]::IsNullOrWhiteSpace($_.Exception.Message)) {
|
||||
Write-Warning $_.Exception.Message
|
||||
}
|
||||
if (-not [string]::IsNullOrWhiteSpace($_.Exception.StackTrace)) {
|
||||
Write-Warning $_.Exception.StackTrace
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -265,4 +265,4 @@ function Invoke-WinUtilISOWriteUSB {
|
||||
}) | Out-Null
|
||||
|
||||
$script.BeginInvoke() | Out-Null
|
||||
}
|
||||
}
|
||||
@@ -25,20 +25,35 @@ function Invoke-WinUtilScript {
|
||||
Invoke-Command $scriptblock -ErrorAction Stop
|
||||
} catch [System.Management.Automation.CommandNotFoundException] {
|
||||
Write-Warning "The specified command was not found."
|
||||
Write-Warning $PSItem.Exception.message
|
||||
if ($_.Exception -and -not [string]::IsNullOrWhiteSpace($_.Exception.Message)) {
|
||||
Write-Warning $_.Exception.Message
|
||||
}
|
||||
} catch [System.Management.Automation.RuntimeException] {
|
||||
Write-Warning "A runtime exception occurred."
|
||||
Write-Warning $PSItem.Exception.message
|
||||
if ($_.Exception -and -not [string]::IsNullOrWhiteSpace($_.Exception.Message)) {
|
||||
Write-Warning $_.Exception.Message
|
||||
}
|
||||
} catch [System.Security.SecurityException] {
|
||||
Write-Warning "A security exception occurred."
|
||||
Write-Warning $PSItem.Exception.message
|
||||
if ($_.Exception -and -not [string]::IsNullOrWhiteSpace($_.Exception.Message)) {
|
||||
Write-Warning $_.Exception.Message
|
||||
}
|
||||
} catch [System.UnauthorizedAccessException] {
|
||||
Write-Warning "Access denied. You do not have permission to perform this operation."
|
||||
Write-Warning $PSItem.Exception.message
|
||||
if ($_.Exception -and -not [string]::IsNullOrWhiteSpace($_.Exception.Message)) {
|
||||
Write-Warning $_.Exception.Message
|
||||
}
|
||||
} catch {
|
||||
# Generic catch block to handle any other type of exception
|
||||
Write-Warning "Unable to run script for $name due to unhandled exception"
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
if ($_.Exception) {
|
||||
if (-not [string]::IsNullOrWhiteSpace($_.Exception.Message)) {
|
||||
Write-Warning $_.Exception.Message
|
||||
}
|
||||
if (-not [string]::IsNullOrWhiteSpace($_.Exception.StackTrace)) {
|
||||
Write-Warning $_.Exception.StackTrace
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -28,6 +28,13 @@ function Set-WinUtilDNS {
|
||||
}
|
||||
} catch {
|
||||
Write-Warning "Unable to set DNS Provider due to an unhandled exception"
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
if ($_.Exception) {
|
||||
if (-not [string]::IsNullOrWhiteSpace($_.Exception.Message)) {
|
||||
Write-Warning $_.Exception.Message
|
||||
}
|
||||
if (-not [string]::IsNullOrWhiteSpace($_.Exception.StackTrace)) {
|
||||
Write-Warning $_.Exception.StackTrace
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,11 +46,22 @@ function Set-WinUtilRegistry {
|
||||
} catch [System.Security.SecurityException] {
|
||||
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||
} catch [System.Management.Automation.ItemNotFoundException] {
|
||||
Write-Warning $psitem.Exception.ErrorRecord
|
||||
Write-Warning $_.Exception.ErrorRecord
|
||||
} catch [System.UnauthorizedAccessException] {
|
||||
Write-Warning $psitem.Exception.Message
|
||||
if ($_.Exception -and -not [string]::IsNullOrWhiteSpace($_.Exception.Message)) {
|
||||
Write-Warning $_.Exception.Message
|
||||
} else {
|
||||
Write-Warning "Unauthorized access while setting $Path\$Name"
|
||||
}
|
||||
} catch {
|
||||
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
if ($_.Exception) {
|
||||
if (-not [string]::IsNullOrWhiteSpace($_.Exception.Message)) {
|
||||
Write-Warning $_.Exception.Message
|
||||
}
|
||||
if (-not [string]::IsNullOrWhiteSpace($_.Exception.StackTrace)) {
|
||||
Write-Warning $_.Exception.StackTrace
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,14 +29,23 @@ function Set-WinUtilScheduledTask {
|
||||
Enable-ScheduledTask -TaskName $Name -ErrorAction Stop
|
||||
}
|
||||
} catch [System.Exception] {
|
||||
if($psitem.Exception.Message -like "*The system cannot find the file specified*") {
|
||||
if ($_.Exception -and $_.Exception.Message -like "*The system cannot find the file specified*") {
|
||||
Write-Warning "Scheduled Task $name was not Found"
|
||||
} else {
|
||||
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||
Write-Warning $psitem.Exception.Message
|
||||
if ($_.Exception -and -not [string]::IsNullOrWhiteSpace($_.Exception.Message)) {
|
||||
Write-Warning $_.Exception.Message
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
Write-Warning "Unable to run script for $name due to unhandled exception"
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
if ($_.Exception) {
|
||||
if (-not [string]::IsNullOrWhiteSpace($_.Exception.Message)) {
|
||||
Write-Warning $_.Exception.Message
|
||||
}
|
||||
if (-not [string]::IsNullOrWhiteSpace($_.Exception.StackTrace)) {
|
||||
Write-Warning $_.Exception.StackTrace
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,14 @@ Function Set-WinUtilService {
|
||||
Write-Warning "Service $Name was not found"
|
||||
} catch {
|
||||
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||
Write-Warning $_.Exception.Message
|
||||
if ($_.Exception) {
|
||||
if (-not [string]::IsNullOrWhiteSpace($_.Exception.Message)) {
|
||||
Write-Warning $_.Exception.Message
|
||||
}
|
||||
if (-not [string]::IsNullOrWhiteSpace($_.Exception.StackTrace)) {
|
||||
Write-Warning $_.Exception.StackTrace
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ function Invoke-WPFFixesWinget {
|
||||
try {
|
||||
Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo"
|
||||
Write-Host "==> Starting Winget Repair"
|
||||
Install-WinUtilWinget -Force
|
||||
Install-WinUtilWinget
|
||||
} catch {
|
||||
Write-Error "Failed to install winget: $_"
|
||||
Set-WinUtilTaskbaritem -state "Error" -overlay "warning"
|
||||
|
||||
@@ -5,9 +5,6 @@
|
||||
<settings pass="windowsPE">
|
||||
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
<UserData>
|
||||
<ProductKey>
|
||||
<WillShowUI>Never</WillShowUI>
|
||||
</ProductKey>
|
||||
<AcceptEula>true</AcceptEula>
|
||||
</UserData>
|
||||
<UseConfigurationSet>false</UseConfigurationSet>
|
||||
|
||||
Reference in New Issue
Block a user