list all startup applications by vb6

Hi experts,
i want to list all startup applications by vb6 code
-  HKEY_LOCAL_MACHINE
-  HKEY_CURRENT_USER
-  Activex
- .. etc

thanks
LVL 1
hintcoAsked:
Who is Participating?
 
ArkCommented:
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
   Next
   MsgBox strOut

End Sub

Open in new window

0
 
hintcoAuthor Commented:
i want code
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.