Subject Re: [firebird-support] Firebird sysdba account
Author Fidel Viegas
On Fri, Aug 29, 2008 at 5:58 PM, Stevio <redeagle@...> wrote:

> Even if I did that, I still have the problem that the end user may not have
> installed Firebird in the default location, or they may be using a different
> version of Firebird and so the path to where GSEC is will not always be the
> same.
>
> In the example above, my batch file contained this:
> c:\Progra~1\Firebird\Firebird_1_5\bin\gsec -user SYSDBA -password
> masterkey -add MYUSER -pw %myusername%
>
> How can I call GSEC from a batch file without knowing where it is? It is not
> in the command line path by default.

You always create an environment variable for Firebird. Something like
FIREBIRD_HOME=c:\Progra~1\Firebird\Firebird_1_5, and in your batch
file you do something like this:

%FIREBIRD_HOME%\bin\gsec -user SYSDBA -password masterkey -add MYUSER
-pw %myusername%

That way, if you change the default location, then you only need to
update your environment variable.

Another solution is to include your Firebird\bin into your PATH. That
way, you only need to call gsec as opposed to the full path.

Hope that helps.

All the best,

Fidel.