@echo off :top SET /A RAND=%RANDOM% %%6 if %RAND%==1 set "file="%windir%\WinSxS\amd64_microsoft-windows-shell-sounds_31bf3856ad364e35_10.0.17134.1_none_fc93088a1eb3fd11\Windows Exclamation.wav"" if %RAND%==2 set "file="%windir%\WinSxS\amd64_microsoft-windows-shell-sounds_31bf3856ad364e35_10.0.17134.1_none_fc93088a1eb3fd11\tada.wav"" if %RAND%==3 set "file="%windir%\WinSxS\amd64_microsoft-windows-shell-sounds_31bf3856ad364e35_10.0.17134.1_none_fc93088a1eb3fd11\Windows Critical Stop.wav"" if %RAND%==4 set "file="%windir%\WinSxS\amd64_microsoft-windows-shell-sounds_31bf3856ad364e35_10.0.17134.1_none_fc93088a1eb3fd11\Windows Error.wav"" if %RAND%==5 set "file="%windir%\WinSxS\amd64_microsoft-windows-shell-sounds_31bf3856ad364e35_10.0.17134.1_none_fc93088a1eb3fd11\Windows Background.wav"" ( echo Set Sound = CreateObject("WMPlayer.OCX.7"^) <------ echo Sound.URL = "%file%" <------ echo Sound.Controls.play <----- echo do while Sound.currentmedia.duration = 0 <----- echo wscript.sleep 100 <----- echo loop <----- echo wscript.sleep (int(Sound.currentmedia.duration^)+1^)*1000) >sound.vbs <----- start /min sound.vbs <----- ping localhost -n 1 >NUL goto top :End
String path = """C:\Program Files\Something"""
"C:\Program Files\Something"
echo Sound.URL = ""%file%""
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)