?
Solved

Software collection

Posted on 2011-05-10
8
Medium Priority
?
312 Views
Last Modified: 2012-05-11
Hi,

I'm looking for at solution that do a software collection on the computer and outputs the result in a CSV file.

Br
0
Comment
Question by:QC20N
  • 3
  • 3
  • 2
8 Comments
 
LVL 13

Expert Comment

by:rgautier
ID: 35728288
From this page: http://msdn.microsoft.com/en-us/library/aa394588(v=vs.85).aspx

comes the following code - which should do what you want.

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" _
    & strComputer & "\root\cimv2")
Set colSoftware = objWMIService.ExecQuery _
    ("Select * from Win32_Product")

For Each objSoftware in colSoftware
    Wscript.Echo "Name: " & objSoftware.Name
    Wscript.Echo "Version: " & objSoftware.Version
Next
0
 
LVL 13

Expert Comment

by:rgautier
ID: 35728300
0
 

Author Comment

by:QC20N
ID: 35728523
But this collect HW. I was interested in SW collection.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 10

Expert Comment

by:ReneGe
ID: 35731057
You asked the list of programs.  Therefore, there is only one column.

So here, the only thing that will look like a csv output file will be the extension.

wmic product get caption>C:\output.csv
0
 
LVL 10

Accepted Solution

by:
ReneGe earned 1000 total points
ID: 35731219
Tested on XP Pro:

wmic /output:%~dp0\Output.csv product get caption,version /format:csv
0
 

Author Closing Comment

by:QC20N
ID: 35736691
Not excat what I had in mind. But it is useful.
0
 
LVL 10

Expert Comment

by:ReneGe
ID: 35736700
Glad i could help
0
 

Author Comment

by:QC20N
ID: 35736720
:)
0

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

Recently I finished a vbscript that I thought I'd share.  It uses a text file with a list of server names to loop through and get various status reports, then writes them all into an Excel file.  Originally it was put together for our Altiris server…
Well hello again!  Glad to see you've made it this far without giving up.  In this, the fourth installment of my popular series, I'm going to cover functions and subroutines, what they are, and why they are useful.  Just in case you stumbled onto th…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

621 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