Matt Gerrans
Posts: 1153
Nickname: matt
Registered: Feb, 2002
|
|
Finding Installed Programs
|
Posted: Dec 21, 2003 9:34 PM
|
|
Essentially, there is no standard that is consistently followed with regard to this any of this, including using "Program Files." In fact, since some companies install several apps under their company name, under "Program Files" you will miss unless you look deeper. This isn't even considering the fact that "Program Files" is not the name of the directory in many non-English systems and "C:" isn't necessarily the home drive, as well as the fact (noted already) that a good number of applications don't install under program files. So really the problem is intractable. You could search for all exes on all drives, but even that is insufficient, since there are many other ways to run programs (bat files, com files, cmd files, class files, jar files, lnk files, py files, etc., etc., etc.).
One trick is to look under the Uninstall key (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall ), but this also has many drawbacks, including the fact that some installers don't populate it and some leave it orphaned after the app has been uninstalled (this is pretty common). Also, you can't access that key when you are running under a "limted" (non-administrator) user account, so it isn't 100% guaranteed that you'll always be able to use that.
There are programs like virus scanners that check what software you have installed, but I think they just maintain a huge manifest of things they know (including multiple versions of different apps, since vendors invariably discover new and interesting ways to install themselves with each release), so they end up missing things they don't already know about (or flagging them as "bad," or "possibly bad," or whatever silly thing they decide to do).
|
|