list all startup applications by vb6

Posted on 2012-09-20
Last Modified: 2012-10-03
Hi experts,
i want to list all startup applications by vb6 code
-  Activex
- .. etc

Question by:hintco
    LVL 11

    Expert Comment

    by:Deepak Lakkad
    LVL 1

    Author Comment

    i want code
    LVL 27

    Accepted Solution

    Private Sub Command1_Click()
       Dim strComputer As String
       strComputer = "."   ' Dot (.) equals local computer in WMI
       Dim oService As Object
       Set oService = GetObject("winmgmts:\\" & strComputer)
       Dim colStartUp As Object
       Set colStartUp = oService.InstancesOf("Win32_StartupCommand")
       Dim strOut As String
       For Each s In colStartUp
           If strOut <> "" Then strOut = strOut & vbCrLf
           strOut = strOut & s.Name & " -> " & s.Command
       MsgBox strOut
    End Sub

    Open in new window


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
    You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now