hello guys, i'm just fooling around with vb 2008, and i thought i'd try to make a simple anti virus. my problem is that it only detects and deletes one of the files, i know it's because i use else if, but i don't know what else to use ?
if i put a steal.exe in my C drive it deletes it, if i put a hack.exe in my C drive it deletes it, but it wont delete both at the same time, so i just want to know what to use instead of else if?
Dim fiFile As New System.IO.FileInfo("C:\Steal.exe")
Dim fiFile1 As New System.IO.FileInfo("C:\Virus.exe")
If fiFile.Exists Then
Virus.Items.Add("Stealer Detected (C:\Steal.exe)")
Label1.Text = "Status : Deleting"
fiFile.Delete()
Virus.Items.Add("Stealer Deleted (C:\Steal.exe)")
Label1.Text = "Status : Finished"
ElseIf fiFile1.Exists Then
Virus.Items.Add("Hack Detected (C:\Virus.exe)")
Label1.Text = "Status : Deleting"
fiFile1.Delete()
Virus.Items.Add("Hack Deleted (C:\Virus.exe)")
Label1.Text = "Status : Finished"