mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-12-17 09:45:22 +00:00
Fix typos (#3637)
This commit is contained in:
parent
72cbdca556
commit
1f81eec8f1
2
.github/CONTRIBUTING.md
vendored
2
.github/CONTRIBUTING.md
vendored
@ -87,7 +87,7 @@ graph TD
|
|||||||
|
|
||||||
### Testing your changes
|
### Testing your changes
|
||||||
|
|
||||||
* To test to see if your changes work as intended run following commands in a powershell teminal as admin:
|
* To test to see if your changes work as intended run following commands in a powershell terminal as admin:
|
||||||
|
|
||||||
* Change the directory where you are running the commands to the forked project.
|
* Change the directory where you are running the commands to the forked project.
|
||||||
* `cd {path to the folder with the compile.ps1}`
|
* `cd {path to the folder with the compile.ps1}`
|
||||||
|
|||||||
@ -2699,7 +2699,7 @@
|
|||||||
"category": "Utilities",
|
"category": "Utilities",
|
||||||
"choco": "ultravnc",
|
"choco": "ultravnc",
|
||||||
"content": "UltraVNC",
|
"content": "UltraVNC",
|
||||||
"description": "UltraVNC is a powerful, easy to use and free - remote pc access softwares - that can display the screen of another computer (via internet or network) on your own screen. The program allows you to use your mouse and keyboard to control the other PC remotely. It means that you can work on a remote computer, as if you were sitting in front of it, right from your current location.",
|
"description": "UltraVNC is a powerful, easy to use and free - remote pc access software - that can display the screen of another computer (via internet or network) on your own screen. The program allows you to use your mouse and keyboard to control the other PC remotely. It means that you can work on a remote computer, as if you were sitting in front of it, right from your current location.",
|
||||||
"link": "https://uvnc.com/",
|
"link": "https://uvnc.com/",
|
||||||
"winget": "uvncbvba.UltraVnc"
|
"winget": "uvncbvba.UltraVnc"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
"AppEntryWidth": "130",
|
"AppEntryWidth": "130",
|
||||||
"AppEntryFontSize": "11",
|
"AppEntryFontSize": "11",
|
||||||
"AppEntryMargin": "1,1,1,1",
|
"AppEntryMargin": "1,1,1,1",
|
||||||
"AppEntryBorderTickness": "0",
|
"AppEntryBorderThickness": "0",
|
||||||
"CustomDialogFontSize": "12",
|
"CustomDialogFontSize": "12",
|
||||||
"CustomDialogFontSizeHeader": "14",
|
"CustomDialogFontSizeHeader": "14",
|
||||||
"CustomDialogLogoSize": "25",
|
"CustomDialogLogoSize": "25",
|
||||||
|
|||||||
@ -99,7 +99,7 @@
|
|||||||
Write-Host \"Turn off Hibernation\"
|
Write-Host \"Turn off Hibernation\"
|
||||||
Start-Process -FilePath powercfg -ArgumentList \"/hibernate off\" -NoNewWindow -Wait
|
Start-Process -FilePath powercfg -ArgumentList \"/hibernate off\" -NoNewWindow -Wait
|
||||||
|
|
||||||
# Set standby to detault values
|
# Set standby to default values
|
||||||
Start-Process -FilePath powercfg -ArgumentList \"/change standby-timeout-ac 15\" -NoNewWindow -Wait
|
Start-Process -FilePath powercfg -ArgumentList \"/change standby-timeout-ac 15\" -NoNewWindow -Wait
|
||||||
Start-Process -FilePath powercfg -ArgumentList \"/change standby-timeout-dc 15\" -NoNewWindow -Wait
|
Start-Process -FilePath powercfg -ArgumentList \"/change standby-timeout-dc 15\" -NoNewWindow -Wait
|
||||||
Start-Process -FilePath powercfg -ArgumentList \"/change monitor-timeout-ac 15\" -NoNewWindow -Wait
|
Start-Process -FilePath powercfg -ArgumentList \"/change monitor-timeout-ac 15\" -NoNewWindow -Wait
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
function Microwin-NewCheckInstall {
|
function Microwin-NewCheckInstall {
|
||||||
|
|
||||||
# using here string to embedd firstrun
|
# using here string to embed firstrun
|
||||||
$checkInstall = @'
|
$checkInstall = @'
|
||||||
@echo off
|
@echo off
|
||||||
if exist "%HOMEDRIVE%\windows\cpu.txt" (
|
if exist "%HOMEDRIVE%\windows\cpu.txt" (
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
function Microwin-NewFirstRun {
|
function Microwin-NewFirstRun {
|
||||||
|
|
||||||
# using here string to embedd firstrun
|
# using here string to embed firstrun
|
||||||
$firstRun = @'
|
$firstRun = @'
|
||||||
# Set the global error action preference to continue
|
# Set the global error action preference to continue
|
||||||
$ErrorActionPreference = "Continue"
|
$ErrorActionPreference = "Continue"
|
||||||
|
|||||||
@ -41,7 +41,7 @@
|
|||||||
$selectedAppRemoveButton.Add_MouseEnter({ $this.Foreground = "Red" })
|
$selectedAppRemoveButton.Add_MouseEnter({ $this.Foreground = "Red" })
|
||||||
$selectedAppRemoveButton.Add_MouseLeave({ $this.SetResourceReference([Windows.Controls.Control]::ForegroundProperty, "MainForegroundColor") })
|
$selectedAppRemoveButton.Add_MouseLeave({ $this.SetResourceReference([Windows.Controls.Control]::ForegroundProperty, "MainForegroundColor") })
|
||||||
$selectedAppRemoveButton.Add_Click({
|
$selectedAppRemoveButton.Add_Click({
|
||||||
$sync.($this.Tag).isChecked = $false # On click of the remove button, we only have to uncheck the corresponding checkbox. This will kick of all neccessary changes to update the UI
|
$sync.($this.Tag).isChecked = $false # On click of the remove button, we only have to uncheck the corresponding checkbox. This will kick of all necessary changes to update the UI
|
||||||
})
|
})
|
||||||
[System.Windows.Controls.Grid]::SetColumn($selectedAppRemoveButton, 1)
|
[System.Windows.Controls.Grid]::SetColumn($selectedAppRemoveButton, 1)
|
||||||
$selectedAppGrid.Children.Add($selectedAppRemoveButton)
|
$selectedAppGrid.Children.Add($selectedAppRemoveButton)
|
||||||
|
|||||||
@ -13,7 +13,7 @@ function Get-LocalizedYesNo {
|
|||||||
#>
|
#>
|
||||||
|
|
||||||
# Run choice and capture its options as output
|
# Run choice and capture its options as output
|
||||||
# The output shows the options for Yes and No as "[Y,N]?" in the (partitially) localized format.
|
# The output shows the options for Yes and No as "[Y,N]?" in the (partially) localized format.
|
||||||
# eg. English: [Y,N]?
|
# eg. English: [Y,N]?
|
||||||
# Dutch: [Y,N]?
|
# Dutch: [Y,N]?
|
||||||
# German: [J,N]?
|
# German: [J,N]?
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
Also creates an overlay with a progress bar and text to indicate that an install or uninstall is in progress
|
Also creates an overlay with a progress bar and text to indicate that an install or uninstall is in progress
|
||||||
|
|
||||||
.PARAMETER TargetElement
|
.PARAMETER TargetElement
|
||||||
The element to which the AppArea shoud be added
|
The element to which the AppArea should be added
|
||||||
|
|
||||||
#>
|
#>
|
||||||
param($TargetElement)
|
param($TargetElement)
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
function Initialize-InstallAppEntry {
|
function Initialize-InstallAppEntry {
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Creates the app entry to be placed on the isntall tab for a given app
|
Creates the app entry to be placed on the install tab for a given app
|
||||||
Used to as part of the Install Tab UI generation
|
Used to as part of the Install Tab UI generation
|
||||||
.PARAMETER TargetElement
|
.PARAMETER TargetElement
|
||||||
The Element into which the Apps should be placed
|
The Element into which the Apps should be placed
|
||||||
@ -54,7 +54,7 @@ function Invoke-WinUtilTweaks {
|
|||||||
$sync.configs.tweaks.$CheckBox.service | ForEach-Object {
|
$sync.configs.tweaks.$CheckBox.service | ForEach-Object {
|
||||||
$changeservice = $true
|
$changeservice = $true
|
||||||
|
|
||||||
# The check for !($undo) is required, without it the script will throw an error for accessing unavailable memeber, which's the 'OriginalService' Property
|
# The check for !($undo) is required, without it the script will throw an error for accessing unavailable member, which's the 'OriginalService' Property
|
||||||
if($KeepServiceStartup -AND !($undo)) {
|
if($KeepServiceStartup -AND !($undo)) {
|
||||||
try {
|
try {
|
||||||
# Check if the service exists
|
# Check if the service exists
|
||||||
|
|||||||
@ -6,35 +6,35 @@ function Set-PackageManagerPreference {
|
|||||||
|
|
||||||
Reads from preference.ini if no argument sent.
|
Reads from preference.ini if no argument sent.
|
||||||
|
|
||||||
.PARAMETER preferedPackageManager
|
.PARAMETER preferredPackageManager
|
||||||
The PackageManager that was selected.
|
The PackageManager that was selected.
|
||||||
#>
|
#>
|
||||||
param(
|
param(
|
||||||
[Parameter(Position=0, Mandatory=$false)]
|
[Parameter(Position=0, Mandatory=$false)]
|
||||||
[PackageManagers]$preferedPackageManager
|
[PackageManagers]$preferredPackageManager
|
||||||
)
|
)
|
||||||
|
|
||||||
$preferencePath = "$env:LOCALAPPDATA\winutil\preferences.ini"
|
$preferencePath = "$env:LOCALAPPDATA\winutil\preferences.ini"
|
||||||
$oldChocoPath = "$env:LOCALAPPDATA\winutil\preferChocolatey.ini"
|
$oldChocoPath = "$env:LOCALAPPDATA\winutil\preferChocolatey.ini"
|
||||||
|
|
||||||
#Try loading from file if no argument given.
|
#Try loading from file if no argument given.
|
||||||
if ($null -eq $preferedPackageManager) {
|
if ($null -eq $preferredPackageManager) {
|
||||||
# Backwards compat for preferChocolatey.ini
|
# Backwards compat for preferChocolatey.ini
|
||||||
if (Test-Path -Path $oldChocoPath) {
|
if (Test-Path -Path $oldChocoPath) {
|
||||||
$preferedPackageManager = [PackageManagers]::Choco
|
$preferredPackageManager = [PackageManagers]::Choco
|
||||||
Remove-Item -Path $oldChocoPath
|
Remove-Item -Path $oldChocoPath
|
||||||
}
|
}
|
||||||
elseif (Test-Path -Path $preferencePath) {
|
elseif (Test-Path -Path $preferencePath) {
|
||||||
$potential = Get-Content -Path $preferencePath -TotalCount 1
|
$potential = Get-Content -Path $preferencePath -TotalCount 1
|
||||||
$preferedPackageManager = [PackageManagers]$potential
|
$preferredPackageManager = [PackageManagers]$potential
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Write-Debug "Creating new preference file, defaulting to winget."
|
Write-Debug "Creating new preference file, defaulting to winget."
|
||||||
$preferedPackageManager = [PackageManagers]::Winget
|
$preferredPackageManager = [PackageManagers]::Winget
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sync["ManagerPreference"] = [PackageManagers]::$preferedPackageManager
|
$sync["ManagerPreference"] = [PackageManagers]::$preferredPackageManager
|
||||||
Write-Debug "Manager Preference changed to '$($sync["ManagerPreference"])'"
|
Write-Debug "Manager Preference changed to '$($sync["ManagerPreference"])'"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@ function Set-WinUtilProgressbar{
|
|||||||
This function is used to Update the Progress Bar displayed in the winutil GUI.
|
This function is used to Update the Progress Bar displayed in the winutil GUI.
|
||||||
It will be automatically hidden if the user clicks something and no process is running
|
It will be automatically hidden if the user clicks something and no process is running
|
||||||
.PARAMETER Label
|
.PARAMETER Label
|
||||||
The Text to be overlayed onto the Progress Bar
|
The Text to be overlaid onto the Progress Bar
|
||||||
.PARAMETER PERCENT
|
.PARAMETER PERCENT
|
||||||
The percentage of the Progress Bar that should be filled (0-100)
|
The percentage of the Progress Bar that should be filled (0-100)
|
||||||
#>
|
#>
|
||||||
|
|||||||
@ -33,7 +33,7 @@ function Test-WinUtilPackageManager {
|
|||||||
$wingetVersionFull = ($wingetInfo | Select-String -Pattern 'Package Manager v\d+\.\d+\.\d+').Matches.Value.Split(' ')[-1]
|
$wingetVersionFull = ($wingetInfo | Select-String -Pattern 'Package Manager v\d+\.\d+\.\d+').Matches.Value.Split(' ')[-1]
|
||||||
}
|
}
|
||||||
} catch [System.Management.Automation.CommandNotFoundException], [System.Management.Automation.ApplicationFailedException] {
|
} catch [System.Management.Automation.CommandNotFoundException], [System.Management.Automation.ApplicationFailedException] {
|
||||||
Write-Warning "Winget was not found due to un-availablity reasons"
|
Write-Warning "Winget was not found due to un-availability reasons"
|
||||||
$wingetExists = $false
|
$wingetExists = $false
|
||||||
} catch {
|
} catch {
|
||||||
Write-Warning "Winget was not found due to un-known reasons, The Stack Trace is:`n$($psitem.Exception.StackTrace)"
|
Write-Warning "Winget was not found due to un-known reasons, The Stack Trace is:`n$($psitem.Exception.StackTrace)"
|
||||||
@ -41,7 +41,7 @@ function Test-WinUtilPackageManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# If Winget is available, Parse it's Version and give proper information to Terminal Output.
|
# If Winget is available, Parse it's Version and give proper information to Terminal Output.
|
||||||
# If it isn't available, the return of this funtion will be "not-installed", indicating that
|
# If it isn't available, the return of this function will be "not-installed", indicating that
|
||||||
# Winget isn't installed/available on The System.
|
# Winget isn't installed/available on The System.
|
||||||
if ($wingetExists) {
|
if ($wingetExists) {
|
||||||
# Check if Preview Version
|
# Check if Preview Version
|
||||||
@ -55,7 +55,7 @@ function Test-WinUtilPackageManager {
|
|||||||
|
|
||||||
# Check if Winget's Version is too old.
|
# Check if Winget's Version is too old.
|
||||||
$wingetCurrentVersion = [System.Version]::Parse($wingetVersion.Trim('v'))
|
$wingetCurrentVersion = [System.Version]::Parse($wingetVersion.Trim('v'))
|
||||||
# Grabs the latest release of Winget from the Github API for version check process.
|
# Grabs the latest release of Winget from the GitHub API for version check process.
|
||||||
$response = winget search -e Microsoft.AppInstaller --accept-source-agreements
|
$response = winget search -e Microsoft.AppInstaller --accept-source-agreements
|
||||||
$wingetLatestVersion = ($response | Select-String -Pattern '\d+\.\d+\.\d+\.\d+').Matches.Value
|
$wingetLatestVersion = ($response | Select-String -Pattern '\d+\.\d+\.\d+\.\d+').Matches.Value
|
||||||
Write-Host "Latest Search Version: $wingetLatestVersion" -ForegroundColor White
|
Write-Host "Latest Search Version: $wingetLatestVersion" -ForegroundColor White
|
||||||
|
|||||||
@ -4,7 +4,7 @@ function Invoke-ScratchDialog {
|
|||||||
<#
|
<#
|
||||||
|
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Enable Editable Text box Alternate Scartch path
|
Enable Editable Text box Alternate Scratch path
|
||||||
|
|
||||||
.PARAMETER Button
|
.PARAMETER Button
|
||||||
#>
|
#>
|
||||||
|
|||||||
@ -12,7 +12,7 @@ function Invoke-WPFInstallUpgrade {
|
|||||||
Write-Host "Upgrade Successful"
|
Write-Host "Upgrade Successful"
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
Write-Host "Error Occured. Return Code: $chocoUpgradeStatus"
|
Write-Host "Error Occurred. Return Code: $chocoUpgradeStatus"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|||||||
@ -24,7 +24,7 @@ function Invoke-WPFtweaksbutton {
|
|||||||
|
|
||||||
Write-Debug "Number of tweaks to process: $($Tweaks.Count)"
|
Write-Debug "Number of tweaks to process: $($Tweaks.Count)"
|
||||||
|
|
||||||
# The leading "," in the ParameterList is nessecary because we only provide one argument and powershell cannot be convinced that we want a nested loop with only one argument otherwise
|
# The leading "," in the ParameterList is necessary because we only provide one argument and powershell cannot be convinced that we want a nested loop with only one argument otherwise
|
||||||
Invoke-WPFRunspace -ParameterList @(,("tweaks",$tweaks)) -DebugPreference $DebugPreference -ScriptBlock {
|
Invoke-WPFRunspace -ParameterList @(,("tweaks",$tweaks)) -DebugPreference $DebugPreference -ScriptBlock {
|
||||||
param(
|
param(
|
||||||
$tweaks,
|
$tweaks,
|
||||||
|
|||||||
@ -23,7 +23,7 @@ function Invoke-Preprocessing {
|
|||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
Invoke-Preprocessing -WorkingDir "DRIVE:\Path\To\Folder\" -ExcludedFiles @('file.txt', '.\.git\', '*.png') -ProgressStatusMessage "Doing Preprocessing"
|
Invoke-Preprocessing -WorkingDir "DRIVE:\Path\To\Folder\" -ExcludedFiles @('file.txt', '.\.git\', '*.png') -ProgressStatusMessage "Doing Preprocessing"
|
||||||
|
|
||||||
Calls 'Invoke-Preprocessing' function using Named Paramters, with 'WorkingDir' (Mandatory Parameter) which's used as the base folder when searching for files recursively (using 'Get-ChildItem'), other two paramters are, in order from right to left, the Optional 'ExcludeFiles', which can be a path to a file, folder, or pattern-matched (like '*.png'), and the 'ProgressStatusMessage', which's used in Progress Bar.
|
Calls 'Invoke-Preprocessing' function using Named Parameters, with 'WorkingDir' (Mandatory Parameter) which's used as the base folder when searching for files recursively (using 'Get-ChildItem'), other two parameters are, in order from right to left, the Optional 'ExcludeFiles', which can be a path to a file, folder, or pattern-matched (like '*.png'), and the 'ProgressStatusMessage', which's used in Progress Bar.
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
Invoke-Preprocessing -WorkingDir "DRIVE:\Path\To\Folder\" -ExcludedFiles @('file.txt', '.\.git\', '*.png') -ProgressStatusMessage "Doing Preprocessing" -ProgressActivity "Re-Formatting Code"
|
Invoke-Preprocessing -WorkingDir "DRIVE:\Path\To\Folder\" -ExcludedFiles @('file.txt', '.\.git\', '*.png') -ProgressStatusMessage "Doing Preprocessing" -ProgressActivity "Re-Formatting Code"
|
||||||
@ -51,7 +51,7 @@ function Invoke-Preprocessing {
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (-NOT (Test-Path -PathType Container -Path "$WorkingDir")) {
|
if (-NOT (Test-Path -PathType Container -Path "$WorkingDir")) {
|
||||||
throw "[Invoke-Preprocessing] Invalid Paramter Value for 'WorkingDir', passed value: '$WorkingDir'. Either the path is a File or Non-Existing/Invlid, please double check your code."
|
throw "[Invoke-Preprocessing] Invalid Parameter Value for 'WorkingDir', passed value: '$WorkingDir'. Either the path is a File or Non-Existing/Invlid, please double check your code."
|
||||||
}
|
}
|
||||||
|
|
||||||
$InternalExcludedFiles = [System.Collections.Generic.List[string]]::new($ExcludedFiles.Count)
|
$InternalExcludedFiles = [System.Collections.Generic.List[string]]::new($ExcludedFiles.Count)
|
||||||
|
|||||||
@ -1350,7 +1350,7 @@
|
|||||||
HorizontalAlignment="Stretch">
|
HorizontalAlignment="Stretch">
|
||||||
<StackPanel Name="MicrowinMain" Background="{DynamicResource MainBackgroundColor}" SnapsToDevicePixels="True" Grid.Column="0" Grid.Row="0">
|
<StackPanel Name="MicrowinMain" Background="{DynamicResource MainBackgroundColor}" SnapsToDevicePixels="True" Grid.Column="0" Grid.Row="0">
|
||||||
<StackPanel Name="MicrowinISOPanel" Background="Transparent" SnapsToDevicePixels="True" Margin="1">
|
<StackPanel Name="MicrowinISOPanel" Background="Transparent" SnapsToDevicePixels="True" Margin="1">
|
||||||
<CheckBox x:Name="WPFMicrowinDownloadFromGitHub" Content="Download oscdimg.exe from CTT Github repo" IsChecked="True" Margin="{DynamicResource MicrowinCheckBoxMargin}" />
|
<CheckBox x:Name="WPFMicrowinDownloadFromGitHub" Content="Download oscdimg.exe from CTT GitHub repo" IsChecked="True" Margin="{DynamicResource MicrowinCheckBoxMargin}" />
|
||||||
<TextBlock Margin="5" Padding="1" TextWrapping="Wrap" Foreground="{DynamicResource ComboBoxForegroundColor}">
|
<TextBlock Margin="5" Padding="1" TextWrapping="Wrap" Foreground="{DynamicResource ComboBoxForegroundColor}">
|
||||||
Choose a Windows ISO file that you've downloaded <LineBreak/>
|
Choose a Windows ISO file that you've downloaded <LineBreak/>
|
||||||
Check the status in the console
|
Check the status in the console
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user