mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-22 07:53:21 +01:00
Updated play-system-sounds.ps1
This commit is contained in:
parent
e2eed4e802
commit
cb9df2ccf2
@ -21,9 +21,12 @@ function PlaySoundFiles([string]$filePattern) {
|
||||
}
|
||||
|
||||
try {
|
||||
if ($IsLinux -or $IsMacOS) { throw "Currently only supported for Windows" }
|
||||
|
||||
$WinDir = Resolve-Path "$env:WINDIR"
|
||||
if (-not(Test-Path "$WinDir" -pathType container)) { throw "Windows directory at 📂$Path doesn't exist" }
|
||||
|
||||
Write-Host "`n Windows System Sounds at $WinDir\Media" -foregroundColor green
|
||||
PlaySoundFiles "$WinDir\Media\*.wav"
|
||||
PlaySoundFiles "$WinDir\Media\*\*.wav"
|
||||
exit 0 # success
|
||||
|
Loading…
Reference in New Issue
Block a user