Subject Re: [firebird-support] Writing to Aliases.conf in non-admin mode
Author Venus Software Operations


On 23/10/2015 08:58 pm, Stefan Heymann lists@... [firebird-support] wrote:
 

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


Thanks Stefan.  I would not want any user to manually do the update thus left it for the application to do this.  Since my post here I found a different way to go about this.  I took a copy of the Aliases.conf to a temp folder and updated is 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