05-12-2011, 09:45 AM
Just a simple viewer.
Full Codes:
Full Codes:
Code:
Imports Microsoft.Win32
Public Class Autostart
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
GetAutoRuns()
process()
End Sub
Sub GetAutoRuns()
' Local Machine
Dim rkLocalMachine As RegistryKey = Registry.LocalMachine
Dim rklocal As RegistryKey = rkLocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run")
For Each valueName As String In rklocal.GetValueNames()
Dim key As String = rklocal.Name
Dim skey As String = valueName
Dim keyvalue = rklocal.GetValue(valueName).ToString()
Dim str(3) As String
Dim itm As ListViewItem
str(0) = skey
str(1) = keyvalue
str(2) = key
itm = New ListViewItem(str)
ListView1.Items.Add(itm)
Next
' Current User
Dim rkCurrentUser As RegistryKey = Registry.CurrentUser
Dim rkcurrent As RegistryKey = rkCurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run")
For Each valueName As String In rkcurrent.GetValueNames()
Dim key As String = rkcurrent.Name
Dim skey As String = valueName
Dim keyvalue = rkcurrent.GetValue(valueName).ToString()
Dim str(3) As String
Dim itm As ListViewItem
str(0) = skey
str(1) = keyvalue
str(2) = key
itm = New ListViewItem(str)
ListView1.Items.Add(itm)
Next
End Sub
Sub process()
Try
Dim psList() = System.Diagnostics.Process.GetProcesses()
For Each p As Process In psList
Dim str(6) As String
Dim itm As ListViewItem
str(0) = p.MainModule.ModuleName
str(1) = p.Id.ToString()
str(2) = p.BasePriority
str(3) = p.Responding
str(4) = p.Threads.Count
str(5) = p.MainModule.FileName
itm = New ListViewItem(str)
ListView2.Items.Add(itm)
Next p
Catch ex As Exception
End Try
End Sub
End Class