diff --git a/winutil.ps1 b/winutil.ps1 index 46891c9d..f29d2d26 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -10,7 +10,7 @@ Author : Chris Titus @christitustech Runspace Author: @DeveloperDurp GitHub : https://github.com/ChrisTitusTech - Version : 24.01.25 + Version : 24.01.15 #> param ( [switch]$Debug, @@ -47,7 +47,7 @@ Add-Type -AssemblyName System.Windows.Forms # Variable to sync between runspaces $sync = [Hashtable]::Synchronized(@{}) $sync.PSScriptRoot = $PSScriptRoot -$sync.version = "24.01.25" +$sync.version = "24.01.15" $sync.configs = @{} $sync.ProcessRunning = $false @@ -452,15 +452,6 @@ Function Get-WinUtilToggleStatus { return $false } } - if($ToggleSwitch -eq "WPFToggleSnapFlyout"){ - $hidesnap = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced').EnableSnapAssistFlyout - if($hidesnap -eq 0){ - return $false - } - else{ - return $true - } - } if($ToggleSwitch -eq "WPFToggleMouseAcceleration"){ $MouseSpeed = (Get-ItemProperty -path 'HKCU:\Control Panel\Mouse').MouseSpeed $MouseThreshold1 = (Get-ItemProperty -path 'HKCU:\Control Panel\Mouse').MouseThreshold1 @@ -567,7 +558,7 @@ Function Install-WinUtilProgramWinget { Write-Progress -Activity "$manage Applications" -Status "$manage $Program $($x + 1) of $count" -PercentComplete $($x/$count*100) if($manage -eq "Installing"){ - Start-Process -FilePath winget -ArgumentList "install -e --accept-source-agreements --accept-package-agreements --scope=machine --silent $Program" -NoNewWindow -Wait + Start-Process -FilePath winget -ArgumentList "install -e --accept-source-agreements --accept-package-agreements --silent $Program" -NoNewWindow -Wait } if($manage -eq "Uninstalling"){ Start-Process -FilePath winget -ArgumentList "uninstall -e --purge --force --silent $Program" -NoNewWindow -Wait @@ -1608,40 +1599,6 @@ function Invoke-WinUtilShowExt { Write-Warning $psitem.Exception.StackTrace } } -function Invoke-WinUtilSnapFlyout { - <# - .SYNOPSIS - Disables/Enables Snap Assist Flyout on startup - .PARAMETER Enabled - Indicates whether to enable or disable Snap Assist Flyout on startup - #> - Param($Enabled) - Try{ - if ($Enabled -eq $false){ - Write-Host "Enabling Snap Assist Flyout On startup" - $value = 1 - } - else { - Write-Host "Disabling Snap Assist Flyout On startup" - $value = 0 - } - # taskkill.exe /F /IM "explorer.exe" - $Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" - taskkill.exe /F /IM "explorer.exe" - Set-ItemProperty -Path $Path -Name EnableSnapAssistFlyout -Value $value - Start-Process "explorer.exe" - } - 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 - } - Catch{ - Write-Warning "Unable to set $Name due to unhandled exception" - Write-Warning $psitem.Exception.StackTrace - } -} function Invoke-WinUtilTweaks { <# @@ -2706,7 +2663,7 @@ function Invoke-WPFGetIso { # @ChrisTitusTech please copy this wiki and change the link below to your copy of the wiki Write-Error "Failed to mount the image. Error: $($_.Exception.Message)" Write-Error "This is NOT winutil's problem, your ISO might be corrupt, or there is a problem on the system" - Write-Error "Please refer to this wiki for more details https://github.com/ChrisTitusTech/winutil/blob/main/wiki/Error-in-Winutil-MicroWin-during-ISO-mounting%2Cmd" + Write-Error "Please refer to this wiki for more details https://github.com/KonTy/winutil/wiki/Error-in-Winutil-MicroWin-during-ISO-mounting" return } # storing off values in hidden fields for further steps @@ -3373,7 +3330,7 @@ function Invoke-WPFPresets { $CheckBoxesToCheck = $sync.configs.preset.$preset } - $CheckBoxes = $sync.GetEnumerator() | Where-Object { $_.Value -is [System.Windows.Controls.CheckBox] -and $_.Name -notlike "WPFToggle*" } + $CheckBoxes = $sync.GetEnumerator() | Where-Object { $_.Value -is [System.Windows.Controls.CheckBox] } Write-Debug "Getting checkboxes to set $($CheckBoxes.Count)" $CheckBoxesToCheck | ForEach-Object { @@ -3553,7 +3510,6 @@ function Invoke-WPFToggle { "WPFToggleNumLock" {Invoke-WinUtilNumLock $(Get-WinUtilToggleStatus WPFToggleNumLock)} "WPFToggleVerboseLogon" {Invoke-WinUtilVerboseLogon $(Get-WinUtilToggleStatus WPFToggleVerboseLogon)} "WPFToggleShowExt" {Invoke-WinUtilShowExt $(Get-WinUtilToggleStatus WPFToggleShowExt)} - "WPFToggleSnapFlyout" {Invoke-WinUtilSnapFlyout $(Get-WinUtilToggleStatus WPFToggleSnapFlyout)} "WPFToggleMouseAcceleration" {Invoke-WinUtilMouseAcceleration $(Get-WinUtilToggleStatus WPFToggleMouseAcceleration)} } } @@ -4858,7 +4814,7 @@ $inputXML = ' - + @@ -4925,11 +4881,6 @@ $inputXML = ' - - -