batch file cool ending 1

batch file cool ending

: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

Here is what the above code is Doing:
1. It creates a random number and stores it in a variable called num.
2. It creates a temporary vbs file with the name temp%num%.vbs.
3. It writes the code to the temporary vbs file.
4. It starts the temporary vbs file.
5. It waits for 2 seconds.
6. It deletes the temporary vbs file.

Similar Posts