• Hello Guest! Welcome to ConsoleCrunch, to help support our site check out the premium upgrades HERE! to get exclusive access to our hidden content.
  • Unable to load portions of the website...
    If you use an ad blocker addon, you should disable it because it interferes with several elements of the site and blocks more than just adverts.
  • Read Rules Before Posting Post Virus Scans with every program.

[VB.NET] Get Active Processes and Services

1UP

Member
This kinda works much like Task manager except in this example you can't end the process / service. I do plan on actually making a slimmed down version of task manager in the future so those who get infected with malware and lose rights to use it will still be able to find out what is running and possibly stop the virus from running.

Anywho, we'll start off with our imports:

Code:
Imports System.ServiceProcess

Now to get the active processes and put them into a listbox as well as the services

Code:
 Dim processList() As Process
  Dim ServiceCon() As ServiceController = ServiceController.GetServices()
  Dim saveFile As IO.StreamWriter
  Dim eachline As Integer
  Try
  processList = Process.GetProcesses()
  For Each proc As Process In processList
  lst_process_list.Items.Add(proc.ProcessName)
  Next (proc)

  saveFile = New IO.StreamWriter(".\processes.txt")

  For i = 0 To lst_process_list.Items.Count - 1
  saveFile.WriteLine(lst_process_list.Items.Item(i))
  Next
  saveFile.Close()

  For Each serv As ServiceController In ServiceCon
  If serv.Status.ToString() = "Running" Then
  lst_service_list.Items.Add(serv.ServiceName)
  End If
  Next serv

  saveFile = New IO.StreamWriter(".\services.txt")
  For i = 0 To lst_service_list.Items.Count - 1
  saveFile.WriteLine(lst_service_list.Items.Item(i))
  Next
  saveFile.Close()

  Catch ex As Exception



  End Try


Not a whole lot to explain here other then it was never finished. There should be some sort of error message if for whatever reason it hits the catch. Also this will save a text tile with the current services and processes running.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • @ God:
    We will see we gotta talk to the boss man Younis
  • @ QM|T_JinX:
    for sure haha well lets hope right
  • @ QM|T_JinX:
    i still think if there was a jailbreak for ps4 this site would have been back for sure
  • @ God:
    That would be awesome I’m sure it will happen before long, technology now a days is crazy! If we can work out a deal and plans I’ll be spreading the word and doing a lot to make it better more attractive and helpful fourms tips giveaways and all
  • @ God:
    I’ve been messing and working with trying to make great CSS for the names. Like Staff Premium news writer etc..
  • @ QM|T_JinX:
    ok so hows that going /
  • @ God:
    It’s going good. So we will see what happens and if the site can come back like it was or better
  • @ QM|T_JinX:
    nice yea lets hope
  • @ QM|T_JinX:
    im going to play some red dead it was great to have spoken to you bro nice to see you back on here
  • @ QM|T_JinX:
    hope you have a great night bro
  • @ God:
    It was good talking with you as well, you have a great night! We will talk later bro
    +1
  • Chat Bot:
    QM|T_JinX has joined the room.
  • @ QM|T_JinX:
    have a great weekend everybody ill be back after the weekend
  • Chat Bot:
    OkBrruh is our newest member. Welcome!
  • Chat Bot:
    uncrtin is our newest member. Welcome!
  • Chat Bot:
    BigTechModz is our newest member. Welcome!
  • @ BigTechModz:
    Hey this is RexMods I don’t remember the login to my old account so I made a new one I am now known as BigTechModz
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    iDior2K is our newest member. Welcome!
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    KillerDino49 is our newest member. Welcome!
  • Chat Bot:
    Xiomber is our newest member. Welcome!
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    QM|T_JinX has joined the room.
      Chat Bot: QM|T_JinX has joined the room.
      Back
      Top