Subject Re: [firebird-support] Re: programmed aliases.conf add/modify?
Author Eddie Bush
Ok. Hrm ... How about this, Michael:

- Using registry, locate HKLM\SOFTWARE\Firebird Project\Firebird Server\Instances\DefaultInstance
- That will tell you where Firebird is installed (assuming there's just one instance)
- Detect where your DB was installed (Could probably have your installer set a registry key for it)
- Open aliases.conf (using info from the key above) and update it (if necessary)
- You'll probably have to write a simple little console application to do this.
- There exists a registry key that can cause an application to run on reboot - set this to the path of your console application that updates aliases.conf.
- Make sure you configure your installer to reboot once installation is "complete" and you're golden.

It's a bit of a hack, but it's the best idea I have. That I'm aware of there is no pre-fab way to do this :-( I bet someone makes one (eventually) though. I like the idea of being free of the specific location details.

I was actually hungry for more specific info than you provided :-) I have been trying to imagine (not hard, mind you, but the thought crosses my mind sometimes) why a person would want to do this programatically. My guess is that you're installing a database on a server that will be hit by clients on other machines ... probably installing a service / control panel applet to manage the db etc? Sorry if I'm being too nosey - I'm relatively new to this sort of thing and always enjoy hearing new ideas. You never know when you will need them!

Regards,

Eddie
----- Original Message -----
From: michael welsch
To: firebird-support@yahoogroups.com
Sent: Monday, March 15, 2004 4:02 AM
Subject: [firebird-support] Re: programmed aliases.conf add/modify?


Hi Eddie,

(I hope I get you right)
The requirements are:
look in aliases.conf if there is an entry like
<mykey> = <anydatabasefile>
if so, modify the value to point to the new database file
else create a new entry
<mykey> = <mydatabasefile>

Regards
Michael


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.620 / Virus Database: 399 - Release Date: 3/12/2004

[Non-text portions of this message have been removed]