[VB][C#] Question on stopping/disabling services

Discussion in 'Mixed Languages' started by Muerto, Feb 16, 2013.

  1. Muerto

    Muerto MDL Debugger

    Mar 7, 2012
    1,865
    2,143
    60
    #21 Muerto, Feb 19, 2013
    Last edited: Jan 12, 2021
    (OP)
    ...
     
  2. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,460
    421
    60
    #22 PAYMYRENT, Feb 19, 2013
    Last edited by a moderator: Apr 20, 2017
    how do you figure? in the reg it is in 4 places. -
    User - Run - RunOnce
    Machine - Run - RunOnce

    FileSystem
    Start Menu User - Startup
    Start Menu Public -- Startup

    TaskScheduler
    Services
    Drivers

    and so on. To list from registry do this
    Code:
        Private Sub loadStartupObjectsUser()
            ListView2.Items.Clear()
            Dim lst As ListViewItem
            StartupKey = My.Computer.Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True)
            For Each value As String In StartupKey.GetValueNames()
                lst = ListView2.Items.Add(value)
                Dim filePath As String = StartupKey.GetValue(value)
                lst.Tag = filePath
                lst.SubItems.Add(filePath)
                lst.SubItems.Add(StartupKey.Name & "\" & value)
            Next
            StartupKey.Close()
        End Sub
        Private Sub loadStartupObjectsMachine()
            ListView3.Items.Clear()
            Dim lst As ListViewItem
            StartupKey = My.Computer.Registry.LocalMachine.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True)
            For Each value As String In StartupKey.GetValueNames()
                lst = ListView3.Items.Add(value)
                Dim filePath As String = StartupKey.GetValue(value)
                lst.Tag = filePath
                lst.SubItems.Add(filePath)
                lst.SubItems.Add(StartupKey.Name & "\" & value)
            Next
            StartupKey.Close()
        End Sub
    
     
  3. Muerto

    Muerto MDL Debugger

    Mar 7, 2012
    1,865
    2,143
    60
    #23 Muerto, Feb 20, 2013
    Last edited: Jan 12, 2021
    (OP)
    ...
     
  4. Muerto

    Muerto MDL Debugger

    Mar 7, 2012
    1,865
    2,143
    60
    #24 Muerto, Feb 20, 2013
    Last edited: Jan 12, 2021
    (OP)
    ...
     
  5. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,460
    421
    60
    #25 PAYMYRENT, Feb 20, 2013
    Last edited: Feb 21, 2013
    well it is given when you are talking about the registry. plus if you are doing a 32bit program it becomes very hard to access the other locations lol its all up to you . i know my way around it though lol
     
  6. Muerto

    Muerto MDL Debugger

    Mar 7, 2012
    1,865
    2,143
    60
    #26 Muerto, Feb 22, 2013
    Last edited: Jan 12, 2021
    (OP)
    ...
     
  7. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,460
    421
    60
    as you know i am a crazy coder from what i added to your software the other day. if you need any more idiot opinions just ask me it might just work :p