PDA

View Full Version : Detect installation of PostgreSQL ODBC driver



NewsArchive
02-23-2010, 01:46 AM
I've got an install where I need to install the PostgreSQL ODBC driver
if it is not installed. Currently, I'm installing the PostgreSQL ODBC
driver (psqlodbc.msi) installer in the application directory, and using
Run Programs to run it if the user leaves the checkbox checked.

I'd like to have it detect if the driver is already installed, and have
the checkbox set appropriately. What's the best way to do this?

Ben
- --
Ben Coleman
CTO, Accelerated Design, Inc.
http://www.accelerateddesign.com/

NewsArchive
02-23-2010, 01:48 AM
Ben,

> I've got an install where I need to install the PostgreSQL ODBC driver
> if it is not installed. Currently, I'm installing the PostgreSQL ODBC
> driver (psqlodbc.msi) installer in the application directory, and using
> Run Programs to run it if the user leaves the checkbox checked.
>
> I'd like to have it detect if the driver is already installed, and have
> the checkbox set appropriately. What's the best way to do this?

You have several different options to handle this. I have attached a "quick
and dirty" demo.

Does this help?

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder is Windows 7 installation -- "point. click. ship"

-- Official Comodo Code Signing and SSL Certificate

NewsArchive
02-24-2010, 01:54 AM
Greetings - Thanks
Regards,
Roberto Artigas

NewsArchive
02-25-2010, 01:31 AM
> Does this help?

Well, by the time I got that, I had already figured out something
similar. I ended up looking for
HKEY_LOCAL_MACHINE\Software\psqlODBC\Version. I might eventually check
the actual version of psqlODBC installed, and execute psqlOCBD.msi in
upgrade mode if it's less than what I'm currently using.

Ben
- --
Ben Coleman
CTO, Accelerated Design, Inc.
http://www.accelerateddesign.com/

NewsArchive
02-25-2010, 01:32 AM
BTW, is it possible to set the Finish Dialog to checked or unchecked
somehow? Currently, it looks like if you specify that Run Program is to
have a Finish Dialog check-box, it will always default to checked.

Ben
- --
Ben Coleman
CTO, Accelerated Design, Inc.
http://www.accelerateddesign.com/

NewsArchive
02-25-2010, 01:33 AM
Ben,

If you're using the check box on the Run Program script element, I don't
know.
But generally, I'd advise against doing it that way.

Since Vista, run-over-the-shoulder installations have discouraged doing a
run-at-the-end because the program will be launched in the context of the
over-the-shoulder administrator, not the user for whom it's being installed.

With some sort of super-secret programming trick, however, Friedrich has
figured a way around this - the "launch non-elevated under UAC check box".
He won't even tell his grandmother how he does it (not that I'm his
grandmother....)

The attached example detects whether the app is being installed on UAC
operating system (Vista, Win7, Server 2k8) and runs the app appropriately at
the end. In this example, the check box is not marked by default (it could
be marked if I set the variable some time before the final wizard loop).

For more information, download the SetupBuilder example files. In the
"Learning SetupBuilder Part I" documentation that installs with it is an
explanation of the "run non-elevated" example program.

Jane