diff --git a/README.md b/README.md index 3ee07b65..85031cc5 100644 --- a/README.md +++ b/README.md @@ -1 +1,15 @@ -# winutil \ No newline at end of file +# Chris Titus Tech Windows Utility + +Launch Command: + +``` +iwr -useb https://christitus.com/win | iex +``` + +## Issues + +If you have any issues with the script please submit them to Issues tab here on GitHub and fill out the template so I can fix any bugs or make feature requests. + +## Contribute Code + +For pull requests, be sure and document ALL changes. If you add something to the tweaks section the undo MUST also be applied to remove the new tweaks. Any tweak not following this format will be denied. Any code not well documented will be denied. diff --git a/winutil.ps1 b/winutil.ps1 index e67c1ee9..bf395edd 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -13,15 +13,16 @@ $inputXML = $inputXML -replace 'mc:Ignorable="d"','' -replace "x:N",'N' -replace [xml]$XAML = $inputXML #Read XAML - $reader=(New-Object System.Xml.XmlNodeReader $xaml) - try{$Form=[Windows.Markup.XamlReader]::Load( $reader )} +$reader=(New-Object System.Xml.XmlNodeReader $xaml) +try{$Form=[Windows.Markup.XamlReader]::Load( $reader )} 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"} + 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" + } } -catch{#if it broke some other way 😀 +catch{# If it broke some other way 😀 Write-Host "Unable to load Windows.Markup.XamlReader. Double-check syntax and ensure .net is installed." } @@ -32,7 +33,7 @@ catch{#if it broke some other way