:end set num=%random% if exist temp%num%.vbs goto num echo ' > "temp%num%.vbs" echo set speech = Wscript.CreateObject("SAPI.spVoice") >> "temp%num%.vbs" echo speech.speak "Goodbye" >> "temp%num%.vbs" start temp%num%.vbs timeout 2 del temp%num%.vbs