[Last Call] Learn how to a build a cloud-first strategyRegister Now


list all startup applications by vb6

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

Question by:hintco

Author Comment

ID: 38424578
i want code
LVL 28

Accepted Solution

Ark earned 2000 total points
ID: 38425862
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


Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

829 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