mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-02-04 06:50:09 +00:00
Fix typos (#3637)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
function Microwin-NewCheckInstall {
|
||||
|
||||
# using here string to embedd firstrun
|
||||
# using here string to embed firstrun
|
||||
$checkInstall = @'
|
||||
@echo off
|
||||
if exist "%HOMEDRIVE%\windows\cpu.txt" (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
function Microwin-NewFirstRun {
|
||||
|
||||
# using here string to embedd firstrun
|
||||
# using here string to embed firstrun
|
||||
$firstRun = @'
|
||||
# Set the global error action preference to continue
|
||||
$ErrorActionPreference = "Continue"
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
$selectedAppRemoveButton.Add_MouseEnter({ $this.Foreground = "Red" })
|
||||
$selectedAppRemoveButton.Add_MouseLeave({ $this.SetResourceReference([Windows.Controls.Control]::ForegroundProperty, "MainForegroundColor") })
|
||||
$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)
|
||||
$selectedAppGrid.Children.Add($selectedAppRemoveButton)
|
||||
|
||||
@@ -13,7 +13,7 @@ function Get-LocalizedYesNo {
|
||||
#>
|
||||
|
||||
# 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]?
|
||||
# Dutch: [Y,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
|
||||
|
||||
.PARAMETER TargetElement
|
||||
The element to which the AppArea shoud be added
|
||||
The element to which the AppArea should be added
|
||||
|
||||
#>
|
||||
param($TargetElement)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
function Initialize-InstallAppEntry {
|
||||
<#
|
||||
.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
|
||||
.PARAMETER TargetElement
|
||||
The Element into which the Apps should be placed
|
||||
@@ -54,7 +54,7 @@ function Invoke-WinUtilTweaks {
|
||||
$sync.configs.tweaks.$CheckBox.service | ForEach-Object {
|
||||
$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)) {
|
||||
try {
|
||||
# Check if the service exists
|
||||
|
||||
@@ -6,35 +6,35 @@ function Set-PackageManagerPreference {
|
||||
|
||||
Reads from preference.ini if no argument sent.
|
||||
|
||||
.PARAMETER preferedPackageManager
|
||||
.PARAMETER preferredPackageManager
|
||||
The PackageManager that was selected.
|
||||
#>
|
||||
param(
|
||||
[Parameter(Position=0, Mandatory=$false)]
|
||||
[PackageManagers]$preferedPackageManager
|
||||
[PackageManagers]$preferredPackageManager
|
||||
)
|
||||
|
||||
$preferencePath = "$env:LOCALAPPDATA\winutil\preferences.ini"
|
||||
$oldChocoPath = "$env:LOCALAPPDATA\winutil\preferChocolatey.ini"
|
||||
|
||||
#Try loading from file if no argument given.
|
||||
if ($null -eq $preferedPackageManager) {
|
||||
if ($null -eq $preferredPackageManager) {
|
||||
# Backwards compat for preferChocolatey.ini
|
||||
if (Test-Path -Path $oldChocoPath) {
|
||||
$preferedPackageManager = [PackageManagers]::Choco
|
||||
$preferredPackageManager = [PackageManagers]::Choco
|
||||
Remove-Item -Path $oldChocoPath
|
||||
}
|
||||
elseif (Test-Path -Path $preferencePath) {
|
||||
$potential = Get-Content -Path $preferencePath -TotalCount 1
|
||||
$preferedPackageManager = [PackageManagers]$potential
|
||||
$preferredPackageManager = [PackageManagers]$potential
|
||||
}
|
||||
else {
|
||||
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"])'"
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ function Set-WinUtilProgressbar{
|
||||
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
|
||||
.PARAMETER Label
|
||||
The Text to be overlayed onto the Progress Bar
|
||||
The Text to be overlaid onto the Progress Bar
|
||||
.PARAMETER PERCENT
|
||||
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]
|
||||
}
|
||||
} 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
|
||||
} catch {
|
||||
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 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.
|
||||
if ($wingetExists) {
|
||||
# Check if Preview Version
|
||||
@@ -55,7 +55,7 @@ function Test-WinUtilPackageManager {
|
||||
|
||||
# Check if Winget's Version is too old.
|
||||
$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
|
||||
$wingetLatestVersion = ($response | Select-String -Pattern '\d+\.\d+\.\d+\.\d+').Matches.Value
|
||||
Write-Host "Latest Search Version: $wingetLatestVersion" -ForegroundColor White
|
||||
|
||||
@@ -4,7 +4,7 @@ function Invoke-ScratchDialog {
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Enable Editable Text box Alternate Scartch path
|
||||
Enable Editable Text box Alternate Scratch path
|
||||
|
||||
.PARAMETER Button
|
||||
#>
|
||||
|
||||
@@ -12,7 +12,7 @@ function Invoke-WPFInstallUpgrade {
|
||||
Write-Host "Upgrade Successful"
|
||||
}
|
||||
else{
|
||||
Write-Host "Error Occured. Return Code: $chocoUpgradeStatus"
|
||||
Write-Host "Error Occurred. Return Code: $chocoUpgradeStatus"
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
||||
@@ -24,7 +24,7 @@ function Invoke-WPFtweaksbutton {
|
||||
|
||||
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 {
|
||||
param(
|
||||
$tweaks,
|
||||
|
||||
Reference in New Issue
Block a user