Search function

Hi!
I need help to make a search function to my program.
I want to search after Spyware (my program is an antispyware program) So then i need help with the search thing. I thought that maybe I must make a file or database with all the spyware names in. Then my program reads the names fro the file\database and search after it. Just think about a anti virus program that search after viruses. Could somebody help me with this?
[434 byte] By [AnaXyd] at [2007-12-16]
# 1
On which subject would you like help? On how to store spyware info in a database and load this info? On how to search for spyware in registry or file system?
papadi at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2
I need help on all those things... Newb in vb... can u please help me?
AnaXyd at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3
you are gonna have to search for information in the internet for these subjects. You can't that kind of help in the forums. Search for instance on subjects like 'reading registry visual basic .net', 'using file system', 'read data from database' etc. All these are big subjects in programming. They can not be discussed in a forum.
papadi at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 4
Ok i understand, but the search function can u help me with that one? It is really hard to find some examples of it...
AnaXyd at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 5
That's no small request. Some companies have spent years, trying to develop a good core to a file/virus search engines.
Basically,
1>Load Database
2>Scan file, compare to database entries, mark file as bad if needed.
3>scan next file.
4>repeat
5>go back and clean 'bad files'
steps 2 and 3 are the real problem steps. This would not be a very easy 'newb' project :)
Dustin_H at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 6
No this wont be a easy project... And im seeking a challenge.. :D Like challenges. I have nearly finished the design that I am very proud of, so now i am trying to get some code samples... Which is not easy... I found a code sample, that searches for a specific file in a specific drive\folder. That was the light in the tunnel... But the thing is, it is unstable in .net. But here, can someone look in the code and maybe help me to make it load from a database and search for the next file? Or just search from the next file? That would be great!
Thx for the help so far mates!

Look at this link to see the search code:
http://www.vb-helper.com/howto_total_file_sizes.html

AnaXyd at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 7
AnaXyd at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 8
the code you found is in VB6. Nothing to do with VB.NET. Here is how to iterate throught the files contained in a folder in VB.NET:


For Each fileName As String In My.Computer.FileSystem.GetFiles("c:\", FileIO.SearchOption.SearchAllSubDirectories, "*.exe")
Dim file As IO.FileInfo = My.Computer.FileSystem.GetFileInfo(fileName)
Debug.WriteLine(file.CreationTime)
Debug.WriteLine(file.LastWriteTime)
Debug.WriteLine(file.Length)
Next

papadi at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 9
Ok thanks, it was very nice. Now i have that step clear... But how do I make it read from a database? Is it very complicated? This was a lot harder than i thought!
AnaXyd at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 10
you have to do some reading and check out some sample projects before starting building you application. Here is a great place to start:
http://samples.gotdotnet.com/quickstart/winforms/
Among others you will find how to access a database.
papadi at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 11
Thanks! The site was very helpful! Big Smile
AnaXyd at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...