From 1126411769e1b9fba1aca63a1c00a522fdbce92d Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Fri, 12 Nov 2021 21:58:14 +0100 Subject: [PATCH] Add some more scripts --- Scripts/open-microsoft-solitaire.ps1 | 15 +++++++++++++++ Scripts/open-skype.ps1 | 20 ++++++++++++++++++++ Scripts/open-spotify.ps1 | 2 +- Scripts/open-windows-defender.ps1 | 15 +++++++++++++++ Scripts/open-xing.ps1 | 15 +++++++++++++++ 5 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 Scripts/open-microsoft-solitaire.ps1 create mode 100644 Scripts/open-skype.ps1 create mode 100644 Scripts/open-windows-defender.ps1 create mode 100644 Scripts/open-xing.ps1 diff --git a/Scripts/open-microsoft-solitaire.ps1 b/Scripts/open-microsoft-solitaire.ps1 new file mode 100644 index 00000000..a0ddeb80 --- /dev/null +++ b/Scripts/open-microsoft-solitaire.ps1 @@ -0,0 +1,15 @@ +<# +.SYNOPSIS + Launches Microsoft Solitaire +.DESCRIPTION + This script launches the Microsoft Solitaire application. +.EXAMPLE + PS> ./open-microsoft-solitaire +.NOTES + Author: Markus Fleschutz · License: CC0 +.LINK + https://github.com/fleschutz/PowerShell +#> + +Start-Process xboxliveapp-1297287741: +exit 0 # success diff --git a/Scripts/open-skype.ps1 b/Scripts/open-skype.ps1 new file mode 100644 index 00000000..c95950e2 --- /dev/null +++ b/Scripts/open-skype.ps1 @@ -0,0 +1,20 @@ +<# +.SYNOPSIS + Launches the Skype app +.DESCRIPTION + This script launches the Skype application. +.EXAMPLE + PS> ./open-skype +.NOTES + Author: Markus Fleschutz · License: CC0 +.LINK + https://github.com/fleschutz/PowerShell +#> + +try { + start-process skype: + exit 0 # success +} catch { + "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" + exit 1 +} diff --git a/Scripts/open-spotify.ps1 b/Scripts/open-spotify.ps1 index 54f18f3d..aa660b11 100755 --- a/Scripts/open-spotify.ps1 +++ b/Scripts/open-spotify.ps1 @@ -11,5 +11,5 @@ https://github.com/fleschutz/PowerShell #> -Start-Process spotify.exe +Start-Process spotify: exit 0 # success diff --git a/Scripts/open-windows-defender.ps1 b/Scripts/open-windows-defender.ps1 new file mode 100644 index 00000000..4b36bfe2 --- /dev/null +++ b/Scripts/open-windows-defender.ps1 @@ -0,0 +1,15 @@ +<# +.SYNOPSIS + Launches Windows Defender +.DESCRIPTION + This script launches the Windows Defender application. +.EXAMPLE + PS> ./open-windows-defender +.NOTES + Author: Markus Fleschutz · License: CC0 +.LINK + https://github.com/fleschutz/PowerShell +#> + +Start-Process windowsdefender: +exit 0 # success diff --git a/Scripts/open-xing.ps1 b/Scripts/open-xing.ps1 new file mode 100644 index 00000000..078e47d3 --- /dev/null +++ b/Scripts/open-xing.ps1 @@ -0,0 +1,15 @@ +<# +.SYNOPSIS + Launches the XING app +.DESCRIPTION + This script launches the XING application. +.EXAMPLE + PS> ./open-xing +.NOTES + Author: Markus Fleschutz · License: CC0 +.LINK + https://github.com/fleschutz/PowerShell +#> + +Start-Process xing: +exit 0 # success