@echo off
setlocal
:loop
REM Generate a random delay between 1 and 10 seconds
powershell -Command “Start-Sleep -Seconds (Get-Random -Minimum 1 -Maximum 11)”
REM Open the CD/DVD drive
powershell -Command “(New-Object -COMObject WMPlayer.OCX.7).cdromCollection.Item(0).Eject()”
goto loop
Set WshShell = CreateObject(“WScript.Shell”)
WshShell.Run “RandomCDOpen.bat”, 0, False