Issue Details (XML | Word | Printable)

Key: CORE-3832
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: ZERROUKI
Votes: 2
Watchers: 3

If you were logged in you would be able to see more operations.
Firebird Core

Problem with Install Command line /COPYFBCLIENT FB 2.5.1

Created: 25/Apr/12 12:40 PM   Updated: 24/Nov/12 06:58 PM
Component/s: Installation
Affects Version/s: 2.5.1
Fix Version/s: None

Environment: Windows XP SP3 Delphi 2006 and Delphi 2010

 Description  « Hide
The Command Line /COPYFBCLIENT
not work (with ShellExecute DELPHI)

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Sean Leyne added a comment - 25/Apr/12 02:15 PM
Have you confirmed whether the option works outside of your Delphi application?

ZERROUKI added a comment - 30/Apr/12 12:06 PM
Yes, just put this Comand line:

C:\Firebird- /CopyFbClient

don't copy FbClient.dll in system32 !
Why ?

- windows XP SP3
- No AntiVirus
- No FireWall

I tried : Classic and SuperServer --> no think !

Also with Task options --> no think !
C:\Firebird- /TASKS="CopyFbClientToSysTask"

Best regards.

Beto Neto added a comment - 09/Jul/12 04:48 PM
I getting the same problem.

Using installer version 2.1.4 win32.

I'm using this params:

/SP- /SILENT /SUPPRESSMSGBOXES /NOCANCEL /COMPONENTS="ServerComponent\SuperServerComponent,ServerComponent,DevAdminComponent,ClientComponent" /TASKS="UseGuardianTask,UseServiceTask,AutoStartTask,CopyFbClientToSysTask,CopyFbClientAsGds32Task" /DIR="c:\Firebird"

/COPYFBCLIENT - This also does not works

Alexey Pavlov added a comment - 07/Nov/12 08:34 AM
I have the same issue with Firebird-2.5.1,2.5.2 on Windows Vista and Windows 7

ZERROUKI added a comment - 07/Nov/12 08:20 PM
- In fact, we must now avoid to copy any think in System32 in both Win vista and Win7, (and greater I think)
  Microsoft says ".... Protected directory are : Program Files, Windows directoy, System32, SystemWOW64,...."
  because of UAC !

- So, the simplest way, as I do now, is to use the classic path :
  C:\Program Files\FireBird\FireBird_2_5\bin\fbClient.dll in my applications.

This is safe.

Treppen added a comment - 22/Nov/12 09:39 AM - edited
This is a very annyoing problem.
It has nothing to do with Windows 7.
If i do not use the /TASKS="CopyFbClientToSysTask" parameter then I will see the checkbox and can check it and all works fine.
But when I use /TASKS="CopyFbClientToSysTask" then the checkbox is not visible. (perhaps it is checked)

Now I assume that there is a check like 'if checkbox.visible and checkbox.enabled' and this is causing the problem.

I want to start the setup with all task set - so the customer doesn't have to do anything.
(preferable as silent install)

I still could start after the installation

C:\Program Files (x86)\Firebird\Firebird_2_5\bin\instclient.exe install fbclient

and install the client. But this is only a bad workaround.

Sorry - I mixed up CopyFbClientToSysTask and COPYFBCLIENT.
But CopyFbClientToSysTask also does not work.

ZERROUKI added a comment - 24/Nov/12 06:58 PM
@Treppen : "It is not - or do you retrieve the installation path from the registry?"

About, the library file path : indeed there is much possibilities :
- The Partition System (C:\ or D:\ etc...)
- The win32 or win64 Program Files
- The FireBird version 1.5 or 2.5 or 3.0 etc...

So, the simplest way to do this, is a test File existence :

This gives the correct path for fbclient.dll : DO NOT use System32 (because of UAC)
In my DataModule on create event I do this test :
procedure TDM.DataModuleCreate(Sender: TObject);


   if FileExists(GetProgramFilesDir + '\Firebird\Firebird_3_0\bin\fbclient.dll') then
     UIBDataBase1.LibraryName :=GetProgramFilesDir + '\Firebird\Firebird_3_0\bin\fbclient.dll'

   else if FileExists(GetProgramFilesDir + '\Firebird\Firebird_2_5\bin\fbclient.dll') then
     UIBDataBase1.LibraryName :=GetProgramFilesDir + '\Firebird\Firebird_2_5\bin\fbclient.dll'

   else if FileExists(GetProgramFilesDir + '\Firebird\Firebird_2_1\bin\fbclient.dll') then
     UIBDataBase1.LibraryName :=GetProgramFilesDir + '\Firebird\Firebird_2_1\bin\fbclient.dll'

   else if FileExists(GetProgramFilesDir + '\Firebird\Firebird_2_0\bin\fbclient.dll') then
     UIBDataBase1.LibraryName :=GetProgramFilesDir + '\Firebird\Firebird_2_0\bin\fbclient.dll';

  UIBDataBase1.UserName :='sysdba';
  UIBDataBase1.PassWord :='masterkey';
  UIBDataBase1.CharacterSet :=csUTF8;



uses windows, SHFOLDER;

function GetProgramFilesDir : string;

function GetSpecialFolderPath(folder : integer) : string;
var path: array [0..MAX_PATH] of char;
  if SUCCEEDED(SHGetFolderPath(0,folder,0,SHGFP_TYPE_CURRENT,@path[0])) then
    Result := path
    Result := '';

GetProgramFilesDir function --> gives naturally the good -> Program Files (x86 or not).

All the Best...