powershell Start-Process -WindowStyle Hidden 'C:\Program Files\Windows Media Player\wmplayer.exe' c:\windows\media\notify.wav运行正常。
powershell Start-Process -WindowStyle Hidden 'C:\Program Files\Windows Media Player\wmplayer.exe' c:\windows\media\windows background.wav跑得不好。
powershell Start-Process -WindowStyle Hidden 'C:\Program Files\Windows Media Player\wmplayer.exe' 'c:\windows\media\windows background.wav'跑得不好。
powershell Start-Process -WindowStyle Hidden 'C:\Program Files\Windows Media Player\wmplayer.exe' "c:\windows\media\windows background.wav"跑得不好。
powershell "& 'C:\Program Files\Windows Media Player\wmplayer.exe' 'c:\windows\media\windows background.wav'"运行正常,但没有隐藏。
请问如何修正论点中的空格?
发布于 2022-08-30 07:42:23
你需要用wmplayer.exe来做吗?应用程序将不可见,但它将作为要在任务管理器或Get-Process中找到的进程加载。powershell方法更符合:
powershell (New-Object System.Media.SoundPlayer('c:\windows\media\Windows Battery Critical.wav')).PlaySync()发布于 2022-08-30 10:31:47
无可见播放器:
powershell (New-Object Media.SoundPlayer 'c:\windows\media\windows background.wav').PlaySync()
powershell $PLAYER = New-Object Media.SoundPlayer; $PLAYER.soundlocation='C:\windows\media\windows background.wav'; $PLAYER.PlaySync()
powershell Add-Type -AssemblyName presentationCore; $mediaPlayer = New-Object system.windows.media.mediaplayer; $mediaPlayer.open('c:\windows\media\windows background.wav'); $mediaPlayer.Play(); start-sleep 3声音文件不支持空格:*
powershell Start-Process -WindowStyle Hidden 'C:\Program Files\Windows Media Player\wmplayer.exe' c:\windows\media\notify.wav & timeout 3 >nul & taskkill /f /im wmplayer.exe>nul可见播放器:
"C:\Program Files\Windows Media Player\wmplayer.exe" "c:\windows\media\windows background.wav" & timeout 3 >nul & taskkill /f /im wmplayer.exe>nulW10:
start "" "c:\windows\media\windows background.wav" & timeout 3 >nul & taskkill /f /im music.ui.exe>nul
start "explorer.exe shell:" "c:\windows\media\windows background.wav" & timeout 3 >nul & taskkill /f /im music.ui.exe>nulW11:
start "" "c:\windows\media\windows background.wav" & timeout 3 >nul & taskkill /f /im microsoft.media.player.exe>nul
start "explorer.exe shell:" "c:\windows\media\windows background.wav" & timeout 3 >nul & taskkill /f /im microsoft.media.player.exe>nulhttps://stackoverflow.com/questions/73538152
复制相似问题