mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-04-02 17:32:09 +00:00
code format using powershell VS code extension
This commit is contained in:
parent
eeba67405d
commit
f992437f7f
14
winutil.ps1
14
winutil.ps1
@ -19,9 +19,11 @@ catch [System.Management.Automation.MethodInvocationException] {
|
||||
Write-Warning "We ran into a problem with the XAML code. Check the syntax for this control..."
|
||||
write-host $error[0].Exception.Message -ForegroundColor Red
|
||||
if ($error[0].Exception.Message -like "*button*") {
|
||||
write-warning "Ensure your <button in the `$inputXML does NOT have a Click=ButtonClick property. PS can't handle this`n`n`n`n"}
|
||||
write-warning "Ensure your <button in the `$inputXML does NOT have a Click=ButtonClick property. PS can't handle this`n`n`n`n"
|
||||
}
|
||||
catch{#if it broke some other way <img draggable="false" role="img" class="emoji" alt="😀" src="https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/svg/1f600.svg">
|
||||
}
|
||||
catch {
|
||||
#if it broke some other way <img draggable="false" role="img" class="emoji" alt="😀" src="https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/svg/1f600.svg">
|
||||
Write-Host "Unable to load Windows.Markup.XamlReader. Double-check syntax and ensure .net is installed."
|
||||
}
|
||||
|
||||
@ -146,7 +148,6 @@ $WPFinstall.Add_Click({
|
||||
$wingetinstall.Add("JetBrains.Toolbox")
|
||||
$WPFInstalljetbrains.IsChecked = $false
|
||||
}
|
||||
|
||||
If ( $WPFInstallmpc.IsChecked -eq $true ) {
|
||||
$wingetinstall.Add("clsid2.mpc-hc")
|
||||
$WPFInstallmpc.IsChecked = $false
|
||||
@ -349,7 +350,6 @@ $WPFinstall.Add_Click({
|
||||
$wingetinstall.Add("Microsoft.Teams")
|
||||
$WPFInstallteams.IsChecked = $false
|
||||
}
|
||||
|
||||
If ( $WPFInstalltreesize.IsChecked -eq $true ) {
|
||||
$wingetinstall.Add("JAMSoftware.TreeSize.Free")
|
||||
$WPFInstalltreesize.IsChecked = $false
|
||||
@ -383,8 +383,7 @@ $WPFinstall.Add_Click({
|
||||
$wingetinstall.ToArray()
|
||||
# Define Output variable
|
||||
$wingetResult = New-Object System.Collections.Generic.List[System.Object]
|
||||
foreach ( $node in $wingetinstall )
|
||||
{
|
||||
foreach ( $node in $wingetinstall ) {
|
||||
Start-Process powershell.exe -Verb RunAs -ArgumentList "-command winget install -e --accept-source-agreements --accept-package-agreements --silent $node | Out-Host" -Wait -WindowStyle Maximized
|
||||
$wingetResult.Add("$node`n")
|
||||
}
|
||||
@ -717,7 +716,8 @@ $WPFtweaksbutton.Add_Click({
|
||||
Stop-Process $taskmgr
|
||||
$preferences.Preferences[28] = 0
|
||||
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\TaskManager" -Name "Preferences" -Type Binary -Value $preferences.Preferences
|
||||
} else {Write-Host "Task Manager patch not run in builds 22557+ due to bug"}
|
||||
}
|
||||
else { Write-Host "Task Manager patch not run in builds 22557+ due to bug" }
|
||||
|
||||
Write-Host "Showing file operations details..."
|
||||
If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager")) {
|
||||
|
Loading…
Reference in New Issue
Block a user