Subject RE: [IBO] Getting Remote Computer Name
Author Helen Borrie
At 04:10 AM 26/02/2006, you wrote:

[ re aliasing paths ]

>Thus, there is nothing to change when you deploy your app. Your app simply
>doesn't know or care."
> OK, I'll definitely do this then, thank you. I understand how this
>aids in flexibility, but how for security?

Because the path goes across the wire in clear. Any resolution is
done at the Y-valve, i.e. after the request reaches the server.

>"Your installer needs to know where the user site wants the database to be.
>This applies to BOTH the host machine and the aliases.conf. So your
>installer needs to be able to find the hostname of the *DATABASE* server
>(which is not necessarily going to be the same as the hostname of the
>software installation server)."
> Well if I specify that that is how the client install is to be done,
>what would the problem be? I think it's a good idea because it minimizes
>the technical information the person installing the software needs to

Either you are the client's system administrator, and can dictate how
the server is set up, or you are an external provider, and have no
control over it. Don't substitute ease of installation for poor
maintainability and guesswork. By all means supply a default
installer file reflecting your preferred defaults, but don't lock it up.

>">How can I determine the machine name for a mapped drive (or even if
> >it's a UNC path, perhaps without parsing the name out of the path
>The question is irrelevant. For each specific deployment, your installer
>needs to SET the server and database path, not GET them.
>The usual way with Delphi is to use an ini file. Whether you read from or
>write to the ini file (or a mixture) depends on how you're controlling
>things, e.g. insisting on hard paths for everything (not advisable, but you
>can force this by hard-coding the ini file) or allowing the Responsible
>Adult running the installer to input some things."
> Heh...if my actual users are doing the install themselves, well they
>can hardly understand their own business in many cases, so I want to
>minimize their input in regards to the install. Typically I think someone
>from my own company would do the installation though.
>Well here is how I ended up doing it: When the server install is run it
>calls GETCOMPUTERNAME and then writes the computer name into a file that I
>put in the directory containing the client install that I set up on the
>Then the client install is run on the client machines (off of the server)
>and then can read the file and puts the computer name in the registry and
>then my main program sets the TIODatabase up when it is initialized.
>Currently the path is still hard coded, but I'll change that to use the
>aliases as you suggest. Does this sound OK?

Only if the host machine running the installer is the same as the
host machine that will run both the database server and the
software. Repeat 100 times, you can't access databases via share
paths, whatever you thought you did with the BDE. (Like, if your BDE
path really was a share, then you were dicing with death.)

>I'm also planning on
>devising an automatic update system that works over the internet as well.

Good luck with that.

>BTW, I think I'm going to order the book from Amazon...I think it works out
>to be $25 cheaper but mainly it will ship within 24 hours and I want it
>ASAP. Is there a foundation or something I can donate the $25 difference
>to? I would be happy to do that and certainly when I start making money
>with my program I would be delighted to support the firebird project as I

Sure is - the Firebird