Hallo,
ist erstmal eine beta ... :
du erstellt ein neues projekt, fügst einen button (button1) und eine listbox (listbox1) ein:
und das muss dann in deine form rein:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As _
System.EventArgs) Handles Button1.Click
searchInRegistry(Me.ListBox1, "mozilla.exe", "c:\reg.dat")
End Sub
Sub searchInRegistry(ByVal l As ListBox, ByVal searchString As String, _
ByVal exportPath As String)
Dim sr As IO.StreamReader
Dim str As String
Dim p1, p2 As Integer
If Not IO.File.Exists(exportPath) Then
MsgBox("exportiere die registry .. kann eine oder mehr sekunde(n)" & _
"dauern .. ")
Application.DoEvents()
Shell("regedit.exe /e " & exportPath, AppWinStyle.Hide, True)
MsgBox("exportiert in die datei " & exportPath & " abgeschlossen !" & _
"suche jetzt nach " & searchString & "..")
End If
sr = New IO.StreamReader(exportPath)
sr.ReadLine()
Do While sr.Peek() >= 0
If InStr(sr.ReadLine(), searchString, CompareMethod.Text) Then
str = sr.ReadLine()
If str <> vbNullString Then
str = (Replace(str, "[", ""))
str = (Replace(str, "]", ""))
str = (Replace(str, "\\", "\"))
p1 = InStr(str, Chr(34))
p2 = InStr(p1 + 1, str, Chr(34))
If (((p1 And p2) > 0) And InStr(str, searchString, _
CompareMethod.Text) > 0) Then
l.Items.Add(Mid(str, p1 + 1, (p2 - p1) - 1))
End If
End If
End If
Loop
sr.Close()
End Sub probier es mal aus ... werde daran weiter "basteln" .. viel glück ..
gruss w|m |