Examples Delphi

Hi everyone again,
Don't worry! I found the solution, which is to look up under
\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall in
HKEY_LOCAL_MACHINE. Using a combination of GetKeyNames
and OpenKey methods and the key "DisplayName" will enumerate
the installed programs to be uninstalled. Interestingly enough, I
notice that if there is a "QuietDisplayName" or
"QuietUninstallName" key, instead of "DisplayName" for an
application in the
\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall path
that application doesn't appear in the Add/Remove Programs
Dialog in the Control Panel. For example, ShockWaveFlash doesn't
whereas Borland Delphi 5.0 does. Correct me if I am wrong.
Thanks for your time.
Hi everyone,
From Delphi, can anyone tell me how to get a list of installed
programs as shown in the Add/Remove Programs dialog in the
Control Panel?
I know that I can get a list of programs (and associated stuff that I
don't really want) by looking up in the registry under \Software in
HKEY_LOCAL_MACHINE with the GetKeyNames method in the
TRegistry class, but
I think there must be a better way!
Many thanks in advance
Slainte
John Penman
Craiglockhart Software
Internet/Intranet and Delphi Solutions Provider &
co-author of 'KickAss Delphi Programming' &
'High Performance Delphi 3 Programming' books.
Author of several articles for Delphi Informant.
http://users.iafrica.com/j/jc/jcp/cs.htm
Contact Phone & Fax No: 27 (0)11 788 6059
CAVEATS
No corrections, just a couple of caveats:
Conceptually, that list isn't a list of INSTALLED programs as you asked for,
rather it's
a list of programs that Windows, theoretically, knows how to Uninstall. It
really only reflects programs that bothered to notify Windows that they'd
installed themselves and registered an uninstall procedure, not all programs do
that (esp. older ones).
Secondly, if a program is uninstalled by running an uninstall option in the
program or an icon in its folder, is removed by a installation manager like
CleanSweep, or is simply deleted; the list in the registry may not accurately
reflect what's actually installed or (more precisely) what's uninstallable.
Stephen Posey
slposey@concentric.net
******************************************************************************************
On Thu, 7 Dec 2000, Robert Meek wrote:
> Does anyone know much about the Windows installer that supposedly
> comes with Win2k pro? It's supposed to be included but I can't find it, and
> it's supposed toe the ONLY way to exploit the Add/Remove applet. Is this
> true? Must you build separate install versions for WinNT and 98 then? Does
> anyone know a GOOD newsgroup or list for talking about these and other Win2k
> issues related to programming?
The Windows Installer is not the only way to get into the Windows 2000
Add/Remove list. Delphi 4 is there, VC++ 6 is there, Photoshop 4 is there,
and all of those predate the Windows Installer. Using the installer might
yield better results in Win2K, but it is not necessary. (Maybe for
"designed for Win2K" certification?)
The Windows Installer is built into Windows 2000. It is msiexec.exe in
the System32 directory. It is associated with *.msi files. You can find
examples of those files on your Office 2000 CDs, if you have that. MSI
files are self-contained installation files, or they can be like the older
INF files.
Rather than have two different installation programs, you would more
likely have two different installation packages. One would be just your
program. The other would be a boot-strapping version of the Installer.
The Installer is available as a redistributable component for versions of
Windows released more than about a year ago (Pre WinME and pre Win2K).
Full documentation is available on MSDN. I don't have the address, but the
library hierarchy is like this:
Platform SDK/Management Services/Setup/Windows Installer.
I think I've seen the MSI SDK on Project JEDI.
--Rob
********************************************************
RE WIN2K SPECIAL INSTALLATION OPTIONS:
'I' use Wise 8.0, and when you set up the installation, there is a page of
options to be used with the Win2K. So, you can build an installation that
will work as normal with Win9x and NT, and will do the special stuff for
Win2K if it detects it on installation.