Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listing of All Installed Programs
Message
 
To
13/10/2005 16:02:02
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
01058842
Message ID:
01059057
Views:
13
The following will enumerate the installed software that were installed using Windows Installer.
loFSO = Createobject("Scripting.FileSystemObject")
loTextFile = loFSO.CreateTextFile("c:\scripts\software.tsv", .T.)
lcComputer = "."
loWMIService = Getobject("winmgmts:" ;
	+ "{impersonationLevel=impersonate}!\\" + lcComputer + "\root\cimv2")
colSoftware = loWMIService.ExecQuery ;
	("Select * from Win32_Product")
loTextFile.WriteLine ("Caption" + Chr(9) + ;
	"Description" + Chr(9) + "Identifying Number" + Chr(9) + ;
	"Install Date" + Chr(9) + "Install Location" + Chr(9) + ;
	"Install State" + Chr(9) + "Name" + Chr(9) + ;
	"Package Cache" + Chr(9) + "SKU Number" + Chr(9) + "Vendor" + Chr(9) ;
	+ "Version")
For Each loSoftware In colSoftware
	loTextFile.WriteLine(loSoftware.Caption + Chr(9) + ;
		loSoftware.Description + Chr(9) + ;
		TRANSFORM(loSoftware.IdentifyingNumber) + Chr(9) + ;
		TRANSFORM(loSoftware.InstallDate2) + Chr(9) + ;
		TRANSFORM(loSoftware.InstallLocation) + Chr(9) + ;
		TRANSFORM(loSoftware.InstallState) + Chr(9) + ;
		loSoftware.Name + Chr(9) + ;
		loSoftware.PackageCache + Chr(9) + ;
		TRANSFORM(loSoftware.SKUNumber) + Chr(9) + ;
		loSoftware.Vendor + Chr(9) + ;
		TRANSFORM(loSoftware.Version)+Chr(13)+Chr(10))
Next
loTextFile.Close
>Does anyone know if there is a tool available to list all programs installed on a PC? Not just running programs, but everything installed.
>
>TIA
>
>Jeff
Previous
Reply
Map
View

Click here to load this message in the networking platform