Skip to content

Instantly share code, notes, and snippets.

@atao
Last active July 3, 2017 22:27
Show Gist options
  • Save atao/4dd52c38d709923c35689c604d8b2fe9 to your computer and use it in GitHub Desktop.
Save atao/4dd52c38d709923c35689c604d8b2fe9 to your computer and use it in GitHub Desktop.
Open CD Drive in random time!
#PowerShell v3
#02/06/2016
Clear-Host
Sleep(1)
Write-Host " _______ ___ __ " -ForegroundColor DarkGreen
Sleep(1)
Write-Host "|#######| |###||##| " -ForegroundColor Green
Sleep(1)
Write-Host "|### ___| |###||__| " -ForegroundColor DarkGreen
Sleep(1)
Write-Host "|###|___ |###| || " -ForegroundColor Green
Sleep(1)
Write-Host "|### ___| ___|###| . " -ForegroundColor DarkGreen
Sleep(1)
Write-Host "|###|___ |#######| " -ForegroundColor Green
Sleep(1)
Write-Host "|_______||_______| " -ForegroundColor DarkGreen
Sleep(2)
Write-Host "L|fè i$ B|g J0k€! " -ForegroundColor Green -BackgroundColor Red
function ejection
{
$eject = New-Object -ComObject Shell.Application
$eject.Namespace(17).Items() | ? {$_.Type -like "*CD*"} | foreach {$_.InvokeVerb("Eject")}
}
$i = 1
while ($a=1)
{
$v = Get-Random -Maximum 10000 -Minimum 0
if ($v -eq 2)
{
#.\taskkill.exe -f /IM explorer.exe > .\null
ejection
#explorer
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment