Add open-screen-magnifier.ps1 and close-screen-magnifier.ps1

This commit is contained in:
Markus Fleschutz 2021-11-04 08:43:36 +01:00
parent 2853cfdd3b
commit 98ac588a23
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,15 @@
<#
.SYNOPSIS
Closes the Screen Magnifier
.DESCRIPTION
This script closes the Windows Screen Magnifier application gracefully.
.EXAMPLE
PS> ./close-screen-magnifier
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
& "$PSScriptRoot/close-program.ps1" "Screen Magnifier" "magnify.exe" ""
exit 0 # success

View File

@ -0,0 +1,20 @@
<#
.SYNOPSIS
Launch the Screen Magnifier
.DESCRIPTION
This script launches the Windows Screen Magnifier application.
.EXAMPLE
PS> ./open-screen-magnifier
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
try {
start-process magnify.exe
exit 0 # success
} catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
exit 1
}