Close Menu
    Facebook X (Twitter) Instagram
    Saturday, October 11
    X (Twitter) LinkedIn Reddit RSS
    All about Endpoint Management
    • Home
    All about Endpoint Management
    Home»SCCM 2007»VBscript to get list of add remove progams with product code install date

    VBscript to get list of add remove progams with product code install date

    Eswar KonetiBy Eswar KonetiMarch 10, 4:18 pm2 Mins Read SCCM 2007 678 Views
    Share
    Facebook Twitter LinkedIn Reddit

    There are many tools like SMS /SCCM or scripting to get list of applications installed on computers(you dont use SMS/SCCM only for this kind of information 🙂 ) but what if the clients are not reported back to site server for some other reason and there could lot of applications installed on computers then you will start troubleshooting the clients why it doesnt report.

     Use the below simple VB script to get list of applications installed on target computers with its installed date and product ID as well.

    Collect list of computers that you are looking for and pipe all the computer names into computers.txt file.

    create a notepad file and name it as applications.vbs and paste the following query into it.

    Output will be piped into status.csv file on the same location where the VBscript runs from.

    On Error Resume Next
    Set fso=CreateObject("scripting.filesystemobject")
    Set objinputfile=fso.OpenTextFile("computers.txt",1,true)
    Set objoutputfile=fso.OpenTextFile("status.csv",2,true)
    Do While objinputfile.AtEndOfLine <> True
    strcomputer=objinputfile.ReadLine
     Set objWMIService = GetObject("winmgmts:\\" & strComputer)
     If Err.Number <> 0 Then
      objoutputfile.WriteLine( strcomputer & " " & Err.Description)
      Err.Clear
      Else
                                  Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Product",,48)
    objoutputfile.WriteLine ("computer name:" & strcomputer)
    For Each objItem in colItems
       objoutputfile.WriteLine("Name: " & objItem.Name  & " , " & "ProductID: " & objItem.ProductID & "," &"Installed On:" & objItem.InstallDate )

    Next
    End if
    Loop
    msgbox("done")

    PS:Both the computers file and VB script should be in same folder location.

     

    SCCM Script to export applications VB Script VBscript to get list of add remove progams with product code install date
    Share. Twitter LinkedIn Email Facebook Reddit

    Related Posts

    SCCM SQL Report – Compare Installed Apps on TWO Different Computers

    July 13, 10:35 am

    Optimize Your Intune Workflow with a Powerful Browser Extension

    March 22, 10:39 am

    Migrate Microsoft 365 Updates from SCCM/MECM to Intune for Co-Managed Devices

    February 11, 9:50 pm

    2 Comments

    1. BC on January 30, 2014 3:35 AM

      I am getting error when running this script, can you please help me.
      error:
      Line:2
      Char:23
      Error: Invalid Character
      Source: Ms VBScript compilation error

      Reply
      • Eswar Koneti on February 5, 2014 9:05 AM

        replace the “ and ' with original quotes ,blog converts them to fancy which do not accept by windows.

        Reply

    Leave a ReplyCancel reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Sign Up

    Get email notifications for new posts.

    Author

    I’m Eswar Koneti ,a tech enthusiast, security advocate, and your guide to Microsoft Intune and Modern Device Management. My goal? To turn complex tech into actionable insights for a streamlined management experience. Let’s navigate this journey together!

    Support

    Awards

    Archives

    © Copyright 2009-2025 Eswar Koneti, All rights reserved.

    Type above and press Enter to search. Press Esc to cancel.