Re: [firebird-support] Writing to Aliases.conf in non-admin mode

2015-11-04 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
> While that answer is correct, the better answer would be for the
> Project to modify engine and installer to be Windows Vista+
> compliant  and have all configuration files stored in All
> Users\Application Data\Firebird and not in Programs Files\Firebird

I just wanted to suggest that "\ProgramData\Firebird" was probably
better. But it seems this folder is the same as "All Users\Application
Data\Firebird".

This non-tree structure can be quite confusing ...


Regards

Stefan



Re: [firebird-support] Writing to Aliases.conf in non-admin mode

2015-11-02 Thread Venus Software Operations venussof...@gmail.com [firebird-support]













Re: [firebird-support] Writing to Aliases.conf in non-admin mode

2015-11-02 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Well, the more easy answer is not install Firebird under the folder
"Program files", because Windows since its Vista version has protected that
folder.

You can install Firebird in C:\FIREBIRD\ or something so and no problems
writing to any of its files.

Greetings.

Walter.



On Sat, Oct 24, 2015 at 1:47 AM, Venus Software Operations
venussof...@gmail.com [firebird-support] 
wrote:

>
>
>
>
> On 23/10/2015 10:24 pm, Eduardo guse...@gmail.com [firebird-support]
> wrote:
>
>
>
> I did what (I think is what) you need many years ago. I don´t remember
> exactly the details, but this is still working. What I did was the
> following:
>
> When my application initiates, it checks if there exists a database named
> MYAPPLICATIONCONFIGURACION.FDB. If it doesn't exist, it creates it. When
> the application creates the database, it creates 3 UDFs executing SQLs
> begining with "DECLARE EXTERNAL FUNCTION ..."
>
> The UDFs are the following (the names are in spanish):
>
> MMudfUbicacionDelAlias
> It is called with a parameter "Alias". It opens the file aliases.conf,
> look for the alias and returns a string with the path of the database.
>
> MMudfPudeEstablecerAlias
> It is called with a parameter "Alias" and a parameter "Path". It opens the
> file aliases.conf, and adds a new line with Alias=Path.
>
> MMudfPudeCrearDirectorio
> It is called with a parameter "Directory". It creates a folder in the hard
> disk with the name indicated.
>
> In the file aliases.conf, there is a line MYAPPLICATIONCONFIGURACION =
> C:\...\MYAPPLICATIONCONFIGURACION.FDB.
>
>
> When a user wants to create a new database, the application opens the
> database MYAPPLICATIONCONFIGURACION and executes the following SQL:
>
> SELECT MMudfPudeEstablecerAlias('Alias','Path') FROM RDB$DATABASE
>
> This can be done using the application in the server or in any client PC
> of the newtork.
>
> Regards
>
> Eduardo
>
> Thanks Eduardo.  I would never have thought of going this way, not good
> with FireBird procedural coding.  Like I wrote to Stefan above I found a
> different way to go about this.  I took a copy of the Aliases.conf to a
> temp folder and updated it as necessary.  Then I used ShellExecute Windows
> API with "runas" parameter to run a custom batch file that does the replace
> of the Alias.conf file with the updated one in the temp folder.  That
> brings up the UAC prompt but that is fine I don't mind announcing that to
> the user of a system change.
>
> Kind regards
> Bhavbhuti
>
> 
>


Re: [firebird-support] Writing to Aliases.conf in non-admin mode

2015-10-23 Thread Eduardo guse...@gmail.com [firebird-support]
I did what (I think is what) you need many years ago. I don´t remember 
exactly the details, but this is still working. What I did was the 
following:


When my application initiates, it checks if there exists a database 
named MYAPPLICATIONCONFIGURACION.FDB. If it doesn't exist, it creates 
it. When the application creates the database, it creates 3 UDFs 
executing SQLs begining with "DECLARE EXTERNAL FUNCTION ..."


The UDFs are the following (the names are in spanish):

MMudfUbicacionDelAlias
It is called with a parameter "Alias". It opens the file aliases.conf, 
look for the alias and returns a string with the path of the database.


MMudfPudeEstablecerAlias
It is called with a parameter "Alias" and a parameter "Path". It opens 
the file aliases.conf, and adds a new line with Alias=Path.


MMudfPudeCrearDirectorio
It is called with a parameter "Directory". It creates a folder in the 
hard disk with the name indicated.


In the file aliases.conf, there is a line MYAPPLICATIONCONFIGURACION = 
C:\...\MYAPPLICATIONCONFIGURACION.FDB.



When a user wants to create a new database, the application opens the 
database MYAPPLICATIONCONFIGURACION and executes the following SQL:


SELECT MMudfPudeEstablecerAlias('Alias','Path') FROM RDB$DATABASE

This can be done using the application in the server or in any client PC 
of the newtork.


Regards

Eduardo

 Mensaje original ----
*Asunto: *Re: [firebird-support] Writing to Aliases.conf in non-admin mode
*De: *Stefan Heymann li...@stefanheymann.de [firebird-support] 
<firebird-support@yahoogroups.com>

*Para: *firebird-support@yahoogroups.com
*Fecha: *23/10/2015 12:28


Bhavbhuti,

> My application allows users to create a database and it's entry in
> aliases.conf is created by the application. This essentially is
> fine and works well in Admin mode, as soon as the same is tried to
> be done using the normal non-admin mode I am not able to update 
aliases.conf


> Question is, in normal user mode, is there a way to update
> aliases.conf using some FireBird API? or any other way?

I don't know of any method that allows this. The aliases.conf file
belongs to the administration/configuration of Firebird and that's why
it can only be modified by an administrator.

It should be possible to change to access rights (once, by an
administrator) so "everybody" can have write access to the
aliases.conf file.

Regards

Stefan






---
El software de antivirus Avast ha analizado este correo electrónico en busca de 
virus.
https://www.avast.com/antivirus


Re: [firebird-support] Writing to Aliases.conf in non-admin mode

2015-10-23 Thread Venus Software Operations venussof...@gmail.com [firebird-support]













Re: [firebird-support] Writing to Aliases.conf in non-admin mode

2015-10-23 Thread Venus Software Operations venussof...@gmail.com [firebird-support]













Re: [firebird-support] Writing to Aliases.conf in non-admin mode

2015-10-23 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
Bhavbhuti,

> My application allows users to create a database and it's entry in
> aliases.conf is created by the application.  This essentially is
> fine and works well in Admin mode, as soon as the same is tried to
> be done using the normal non-admin mode I am not able to update aliases.conf

> Question is, in normal user mode, is there a way to update
> aliases.conf using some FireBird API?  or any other way?

I don't know of any method that allows this. The aliases.conf file
belongs to the administration/configuration of Firebird and that's why
it can only be modified by an administrator.

It should be possible to change to access rights (once, by an
administrator) so "everybody" can have write access to the
aliases.conf file.


Regards

Stefan




[firebird-support] Writing to Aliases.conf in non-admin mode

2015-10-20 Thread venussof...@gmail.com [firebird-support]
Hi all

My application allows users to create a database and it's entry in aliases.conf 
is created by the application.  This essentially is fine and works well in 
Admin mode, as soon as the same is tried to be done using the normal non-admin 
mode I am not able to update aliases.conf

Question is, in normal user mode, is there a way to update aliases.conf using 
some FireBird API?  or any other way?

Kind regards
Bhavbhuti