Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Removing OLEPublic attribute from all classes
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01510083
Message ID:
01510115
Vues:
74
This message has been marked as a message which has helped to the initial question of the thread.
>I'm wondering how can I get a list of all apps installed (like the one from Control Panel)?

A limited way is using WMI, limited and not recommended for it has some undesired effects and for it only list software installed using MSI files, there was a way to make it work with others, but I cannot find my notes about it, nor do I have time to research now.
local loProducts, loProduct, loWMI

loLocator			= CREATEOBJECT('WBEMScripting.SWBEMLocator')
loWMI				= loLocator.ConnectServer()
loProducts			= loWMI.ExecQuery("SELECT * FROM Win32_Product")

For Each loProduct in loProducts
	with loProduct
		if Isnull(.Name)
			loop
		endif
		? .Name, .Caption, .Description, .IdentifyingNumber, .InstallDate, .InstallDate2, .InstallLocation, .SKUNumber, .Vendor, .Version
	endwith
endfor
An alternative would be to scan the registry to find this list (using path SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall)
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform