I'm planning a migration to Vista for my company. But to avoid unnecessary license cost i'd like to make a vb-script that lists all installed software for the current machine. I'd also like to know the date the user last used the software.

Anyone any idea how to do this? I found this but that doesn't report correct.

<job id="FindSoftware">
<script language="VBScript">
On Error Resume Next
Dim X
set X = createobject("WSCRIPT.Network")
dim U

strComputer = "."
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
'Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")

Set colFeatures = objWMIService.ExecQuery _
("SELECT * FROM Win32_SoftwareFeature")

Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.CreateTextFile("MYSERVERshare" & U & ".txt",2)
For each objFeature in colFeatures
file.writeline "Product Name: " & objFeature.Name & ";"
file.writeline "Caption: " & objFeature.Caption & ";"
file.writeline "Description: " & objFeature.Description & ";"
file.writeline "Vendor: " & objFeature.Vendor & ";"
file.writeline "Last Use: " & objFeature.LastUse & ";"
file.writeline ""

set file =nothing
set fso=nothing
wscript.echo "finished"



0 Comments   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


As ever, a simple Google search will have found examples. Admittedly some are better than others. One I have used in anger in the past is available at http://www.jsware.net. Check out EnumSoft.vbs and MSIList.vbs
Answered 04/29/2008 by: VBScab
Red Belt

Please log in to comment
Please send me the VB script to install a software
Condition: the msi file is in the same loacation where VB script is located
Answered 07/10/2008 by: nrkres
Senior Yellow Belt

Please log in to comment
Can I refer you to post #10 in this thread http://itninja.com/question/faulttree-10449 the content of which still applies here? If you're too lazy to learn to script, or are somehow congenitally unable to use a search engine, then you need to find someone to do it for you in return for payment. Please stop asking here.
Answered 07/11/2008 by: VBScab
Red Belt

Please log in to comment