Results 1 to 2 of 2

Getting Installed Applications

Threaded View

  1. #1
    Registered User
    Join Date
    03-07-2011
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    5

    Getting Installed Applications

    Here's the code that I got to get Installed applications in any PC (Window 7). This thing once worked on my side but when I execute it again I'm getting run time error '-2147217392 (80041010) - Automation Error. Anyone can help me? Thanks..


    Sub test2()
    
    x = 2
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
      & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colSoftware = objWMIService.ExecQuery("Select * from Win32reg_AddRemovePrograms64") 
    
    For Each objSoftware In colSoftware '--> in this line the error comes up.
                  
                ActiveWorkbook.Sheets("Sheet1").Cells(x, 4).Value = objSoftware.DisplayName 'needed
                ActiveWorkbook.Sheets("Sheet1").Cells(x, 5).Value = objSoftware.Version          
                x = x + 1
       Next
    End Sub
    Last edited by arlu1201; 09-18-2012 at 07:43 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1