Hey i'm making a program that i need a listview with 4 collums "Virus name, Virus signature, virus dir, virus risk", i need my program to understand what what each line is and look for the virus in the line that has the virus name and then look at the virus dir and look for it there, i tried to get this working but its a pain in the butt for a beginer like me. so basicly what i'm asking is:
1.How do you add items to a listview?
2.How do you get my app to read the listview table and read it line by line?
Here is the interface i made, this is version 3 Prerelease though,
Here is how Personal Scanning happens, they choose the DIR to scan aka for network drives or addition usb's
Now here is where they choose a drive if the user is not that smart,
Here is the listview i was talking about, i want the app to read the object and know what DIR to look for
and yes i'm making a light wieght virus remover so far when the user issues a scan it run's this code:
so as you can see i have to enter items for it to kill on a time by time basis and include it in the base code unless i get some listview grid table up so i can just add it like that then send out the program again, Ego easer for me and my employer.Code:If txt_path.TextLength <= 0 Then MsgBox("Please Select a Drive to Scan!", MsgBoxStyle.Exclamation) Else On Error Resume Next 'Deff database Dim autoprotect As Boolean Dim winsurf78 As Boolean Dim Genautorun As Boolean Dim Genautorun2 As Boolean Dim sscvihost2 As Boolean Dim blastclnnn As Boolean winsurf78 = My.Computer.FileSystem.DirectoryExists(txt_path.Text & "Autorun") autoprotect = My.Computer.FileSystem.DirectoryExists(txt_path.Text & "Autoprotect") Genautorun = My.Computer.FileSystem.FileExists(txt_path.Text & "Autorun.inf") Genautorun2 = My.Computer.FileSystem.FileExists(txt_path.Text & "Autorun.ini") sscvihost2 = My.Computer.FileSystem.FileExists(txt_path.Text & "SSCVIHOST.exe") blastclnnn = My.Computer.FileSystem.FileExists(txt_path.Text & "blastclnnn.exe") 'Killing Virus Processes thread Dim Virus1() As Process Virus1 = Process.GetProcessesByName("DrvMonitor") For Each proc As Process In Virus1 Virus.threat_table.Items.Add("VIRUS FOUND!, Virus: " & proc.ProcessName) proc.Kill() Next Dim Virus2() As Process Virus2 = Process.GetProcessesByName("sscvihost") For Each proc As Process In Virus2 Virus.threat_table.Items.Add("VIRUS FOUND!, Virus: " & proc.ProcessName) proc.Kill() Next Dim Virus3() As Process Virus3 = Process.GetProcessesByName("blastclnnn") For Each proc As Process In Virus3 Virus.threat_table.Items.Add("VIRUS FOUND!, Virus: " & proc.ProcessName) proc.Kill() Next On Error Resume Next 'General Threat Files NON-Background runners If winsurf78 = True Then My.Computer.FileSystem.DeleteDirectory(txt_path.Text & "Autorun", FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently) Virus.threat_table.Items.Add("Virus Winsurf78 Client Files Erased! at: " & DateAndTime.Now) Virus.virus_dir.Items.Add("Virus Winsurf78 Located at: " & txt_path.Text & "Autorun") End If If autoprotect = True Then My.Computer.FileSystem.DeleteDirectory(txt_path.Text & "Autoprotect", FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently) Virus.threat_table.Items.Add("Virus Winsurf78 Host Files Erased! at: " & DateAndTime.Now) Virus.virus_dir.Items.Add("Virus Winsurf78 Located at: " & txt_path.Text & "Autoprotect") End If If Genautorun = True Then My.Computer.FileSystem.DeleteFile(txt_path.Text & "Autorun.inf", FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently) Virus.threat_table.Items.Add("Virus Gen.Autorun.inf Client File Erased! at: " & DateAndTime.Now) Virus.virus_dir.Items.Add("Virus Gen.Autorun.inf Located at: " & txt_path.Text & "Autorun.inf") End If If Genautorun2 = True Then My.Computer.FileSystem.DeleteFile(txt_path.Text & "Autorun.ini", FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently) Virus.threat_table.Items.Add("Virus Gen.Autorun.ini Client File Erased! at: " & DateAndTime.Now) Virus.virus_dir.Items.Add("Virus Gen.Autorun.ini Located at: " & txt_path.Text & "Autorun.ini") End If If sscvihost2 = True Then My.Computer.FileSystem.DeleteFile(txt_path.Text & "SSCVIHOST.exe", FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently) Virus.threat_table.Items.Add("Virus W32/Sohana.w Client File Erased! at: " & DateAndTime.Now) Virus.virus_dir.Items.Add("Virus W32/Sohana.w Located at: " & txt_path.Text & "SSCVIHOST.exe") End If If blastclnnn = True Then My.Computer.FileSystem.DeleteFile(txt_path.Text & "blastclnnn.exe", FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently) Virus.threat_table.Items.Add("Virus W32/blastclnnn.w Client File Erased! at: " & DateAndTime.Now) Virus.virus_dir.Items.Add("Virus W32/blastclnnn.w Located at: " & txt_path.Text & "blastclnnn.exe") End If 'end events If winsurf78 = False And autoprotect = False And Genautorun = False And sscvihost2 = False And blastclnnn = False Then MsgBox("Scan Finished, No USB Viral Threats were Located. Loading Scan Results..", MsgBoxStyle.Information) Virus.threat_table.Items.Add("Scan Run at: " & DateAndTime.Now) Virus.virus_dir.Items.Add("No USB Viruses Were Located On: " & txt_path.Text) Virus.Label1.Text = "No USB Viruses Found." Virus.Text = "No USB Viruses Found." Virus.ShowDialog() Else MsgBox("Scan Finished, One or More USB Viral Threats were Located. The Log File Will Be Displayed now.", MsgBoxStyle.Exclamation) Virus.Label1.Text = "One or More USB Viruses Found." Virus.Text = "One or More USB Viruses Found." Virus.ShowDialog() End If End If
cheers in advance
-Jared
URGAME Hardware Reviews
Could you write an example?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks