diff --git a/Scripts/open-visual-studio.ps1 b/Scripts/open-visual-studio.ps1 index e3e8ed64..8171303d 100755 --- a/Scripts/open-visual-studio.ps1 +++ b/Scripts/open-visual-studio.ps1 @@ -1,26 +1,26 @@ <# .SYNOPSIS - Launches the Visual Studio app + Launches Visual Studio .DESCRIPTION - This script launches the Microsoft Visual Studio application. + This PowerShell script launches the Microsoft Visual Studio application. .EXAMPLE - PS> ./open-visual-studio + PS> ./open-visual-studio.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -function TryLaunching { param($Path) - if (test-path "$Path" -pathType leaf) { - start-process "$Path" +function tryToLaunch { param($filePath) + if (Test-Path "$filePath" -pathType leaf) { + Start-Process "$filePath" exit 0 # success } } try { - TryLaunching "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.exe" - TryLaunching "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe" + tryToLaunch "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.exe" + tryToLaunch "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/Scripts/uninstall-bloatware.ps1 b/Scripts/uninstall-bloatware.ps1 index 29b972ed..414f1a69 100755 --- a/Scripts/uninstall-bloatware.ps1 +++ b/Scripts/uninstall-bloatware.ps1 @@ -1,4 +1,17 @@ -"Removing System Applications..." +<# +.SYNOPSIS + Uninstalls bloatware +.DESCRIPTION + This PowerShell script uninstalls unnecessary software and applications. +.EXAMPLE + PS> ./uninstall-bloatware.ps1 +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +"⏳ (1/3) Removing System Applications..." winget uninstall 'OMEN Audio Control' winget uninstall 'OMEN Gaming Hub' winget uninstall 'Clipchamp' @@ -32,14 +45,14 @@ winget uninstall 'Microsoft Teams' winget uninstall 'Mail and Calendar' winget uninstall 'Snipping Tool' -"Removing Xbox associated applications..." +"⏳ (2/3) Removing Xbox associated applications..." winget uninstall 'Xbox' winget uninstall 'Xbox TCUI' winget uninstall 'Xbox Game Bar Plugin' winget uninstall 'Xbox Identity Provider' winget uninstall 'Xbox Game Speech Window' -"Removing miscellaneous Apps that crowd the Start Menu..." +"⏳ (3/3) Removing miscellaneous Apps that crowd the Start Menu..." winget uninstall 'Spotify Music' winget uninstall 'Messenger' winget uninstall 'Instagram' @@ -48,4 +61,5 @@ winget uninstall 'Netflix' winget uninstall 'LinkedIn' winget uninstall 'Prime Video for Windows' +"✔️ Finished" exit 0 # success \ No newline at end of file diff --git a/Scripts/write-ascii-image.ps1 b/Scripts/write-ascii-image.ps1 index d84efbde..269e16c5 100755 --- a/Scripts/write-ascii-image.ps1 +++ b/Scripts/write-ascii-image.ps1 @@ -1,4 +1,4 @@ -<# +<# .SYNOPSIS Writes an ASCII image .DESCRIPTION diff --git a/Scripts/write-fractal.ps1 b/Scripts/write-fractal.ps1 index 73eaf489..bdb860c8 100755 --- a/Scripts/write-fractal.ps1 +++ b/Scripts/write-fractal.ps1 @@ -4,7 +4,7 @@ .DESCRIPTION This PowerShell script writes an animated Mandelbrot fractal. .EXAMPLE - PS> ./write-fractal + PS> ./write-fractal.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES