Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Source] Get Startup and Running Process
#1
Just a simple viewer.

[Image: Dz9QO.png]

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
USB Anti-virus? Try USB Drive Defender
[Image: 8bQCusS.jpg]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Source] List Process'/Kill Process ♱ RedTube ♱ 3 1,817 11-25-2012, 10:39 PM
Last Post: ƃu∀ ıʞƃu∀
  [VB.Net] Local/Remote TCP info from process [Source] The-One 5 4,129 08-11-2012, 05:18 PM
Last Post: Kenneth
  [Project] Write To Another Process' Memory Block AceInfinity 5 2,735 03-31-2012, 04:05 AM
Last Post: AceInfinity
  Process Detective (32 & 64 bit binaries) AceInfinity 3 1,522 03-23-2012, 12:09 PM
Last Post: AceInfinity
  [Source ] Hemp Tycoon App [/Source] VB.net KoBE 8 9,748 03-05-2012, 10:30 PM
Last Post: SomeWhiteGuy?

Forum Jump:


Users browsing this thread: 1 Guest(s)