Subject Re: Firebird Has To Be Manually Startred On One PC.
Author inoffensive_2006
--- In, Helen Borrie <helebor@...> wrote:
> At 07:34 AM 8/06/2008, you wrote:
> >Hi Again Folks:
> >
> > Developing on XP Home, Visual Studio 2008, C++,
> >Firebird- - Superserver, and IBPP.
> >
> > Thanks to clever design by Firebird's creators, my
> >app can perform a silent install of the SuperServer,
> >and a user that doesn't even know what a database is
> >has very nice Client - Server components up and running.
> >
> > Well, most users can. One user, my partner in this
> >business, is having fits.
> >
> > I'll spare you the long story. Firebird is installed
> >with:
> >
> > "..\..\..\inno\release_package\Firebird-"
> > ServerComponent,
> > ServerComponent\SuperServerComponent,
> > DevAdminComponent,ClientComponen
> >
> > All of this is one one line.
> Assuming you didn't omit the 't'.... ;-)

Thanks Again Helen:

Yep, checked, I have the "t".

In an effort to not make my original post 4 pages long,
you know how I can go on and on, I neglected to mention

The application does the following:

If, under the registry's HKEY_LOCAL_MACHINE key,
the subkey "Firebird" is present, no attempt is made to
install Firebird.

So the installation would not even be attempted if
Firebird was installed, let alone running.

But if Firebird isn't installed, we install it now,
using Firebird's Inno scripts. The question at this
point becomes, "After a fresh install, is Firebird
running right now?"

> > On my machine this means Firebird server is running,
> AS A SERVICE (the default on a service-capable host)

Yes, after installation it's running as a service. Not
a service that auto starts, Guardian is running as a service
that auto starts.

This is the state of my XP Home machine, and the XP-
Media machine. XP-Mediacenter is a version of XP Pro if I
understand the situation.

On my partner's machine, also running XP home, Firebird
has just been been installed, but isn't running.

Why? Can we detect this state, and force Firebird to
start, so we can run GSEC and finish the install?

> > On my business partner's machine this installs Firebrid
> >but doesn't start the service, which causes the password
> >and account add to fail.
> There's a Catch-22. You can't *complete* a no-brain service install
up to the point where the newly-installed service is started if the
already has a Firebird server running.

Right. And we aren't doing that. Firebird is not
installed over an existing install of Firebird.

> > Is there a clever way to tell the server to be running
> >when Inno is finished, like it does on my machines?
> There's no way to make a service run if that service is already
running, "clever" or not.

I understand. That's not what I'm trying to do.

> > Can I test if the guardian is running?
> The script (or perhaps the instsvc.exe call, I'm not sure which)
does that test itself. Even in obsolete versions it gets the right
answer if guardian is running.

But at this point Firebird's Inno script has done its
thing. Is Firebird running after the installation?

> > Is there any problem if I add a command to run
> >"fbguard.exe -a" to the install process for every install,
> >even if the guardian is running?
> Of course there's a problem. Guardian running as an application
will try to start fbserver.exe -a. Do you understand the differences
between running as a service and running as an application?

Well, I hadn't heard the term until recently. I gather
that a service is something the system typically starts at
boot time, and isn't connected to any particular process.
Yea, that's what Wikipedia says, so I guess I do understand
on a rudimentary level.

> If you have completed an "as-a-service install" (stuffed-up or not),
trying to start Firebird as application isn't going to cure anything -
it will just make matters worse.
> "Install" means multiple things. Firebird's installer script (and
presumably your modified version of it) creates directories and copies
files into them.

I use Inno, and have an Inno script, for my application.
Firbird uses Inno, and has it's Inno script. I haven't
touched Firebird's Inno script.

>After that, it invokes instsvc.exe with the appropriate switches to
*install the service* (which writes the necessary stuff into the
system database), again with flags as appropriate for running the
specified executable. If it can, it starts the service. However, If
it can't start the service, you won't know, because you're using
/SILENT to suppress messages.
> What you are encountering here is what you could expect when you try
to install Firebird over the top of a running Firebird. You're not
supposed to do that and the installer script is expected to stop if it
finds a running Firebird or InterBase server.

Again, my apologies. I didn't explain that this would never
run a Firebird install if Firebird was already installed. And
any question about a running Firebird refer to the question of
Firebird running after install, as it does on my two PCs, or
Firebird not running after install, and not able to finish
the install, as it does with my partner's PC.

> The trouble is, it was always assumed that the test for a running
server executable (fbserver.exe or fb_inet_server.exe) worked. It was
not until late in the v.2.1 and v.2.0.4 release cycles that it was
discovered that call actually returns negative ALWAYS if there's no
guardian. It got fixed (or so we hope) for the v.2.1.0 and v.2.0.4

Can you tell me where I can find documentation about that
test? If I can see that the guardian isn't running I can
safely start it, right? I'd appreciate pointers to any
references that describe this test and startup procedure.

And again, I appreciate your guidance.