Viruses with Bat Codes

You have a chance to create a real virus with .bat codes by simply using Wordpad or Notepad and don’t need any special program for this.

Real viruses can be written by files with bat extensions for various purposes such as formatting, deleting files, deleting drives, disabling keyboards. Some of these – even jokingly – can lead to very serious consequences and data losses.

However, it is also possible to write viruses that can be considered relatively innocent. For example, a virus that make your CD driver always turned on.

CD / DVD ROM Virus

Now let’s take a look at what this virus code is and how to write it. Follow the simple steps stated below:

  1. Open a Wordpad or Notepad file first.
  2. Paste the following code into the file.

Set oWMP = CreateObject(“WMPlayer.OCX.7”)
Set colCDROMs = oWMP.cdromCollection
do
if colCDROMs.Count >= 1 then
For i = 0 to colCDROMs.Count – 1
colCDROMs.Item(i).Eject
Next
For i = 0 to colCDROMs.Count – 1
colCDROMs.Item(i).Eject
Next
End If
wscript.sleep 5000
loop

  1. Save the file as virus.vbs
  2. Close and double-click the file. Now your CD / DVD ROM will continue to eject even if you close it.
  3. After fun ends, you need to find the wscript.exe file from the Task Manager and click “End Task”.

Note: When doing this you will need to turn off the virus protection or reject its warnings.

2 thoughts on “Writing Virus with Notepad

  1. Back in the days, I used to prank my friends with this kind of bs. One time, I made a fake virus warning which appeared over and over again using notepad. My friend completely freaked out :)…

    Those pranks which involve VBA and macros are quite funny too.

    Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s