FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.26k stars 217 forks source link

Problem with Install Command line /COPYFBCLIENT FB 2.5.1 [CORE3832] #4174

Open firebird-automations opened 12 years ago

firebird-automations commented 12 years ago

Submitted by: ZERROUKI (moyzer)

Votes: 2

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

firebird-automations commented 12 years ago
Modified by: Sean Leyne (seanleyne) Component: Installation \[ 10012 \] Component: API / Client Library \[ 10040 \] =\>
firebird-automations commented 12 years ago

Commented by: Sean Leyne (seanleyne)

Have you confirmed whether the option works outside of your Delphi application?

firebird-automations commented 12 years ago

Commented by: ZERROUKI (moyzer)

Yes, just put this Comand line:

C:\Firebird-2.5.1.26351_1_Win32.exe /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-2.5.1.26351_1_Win32.exe /TASKS="CopyFbClientToSysTask"

Best regards.

firebird-automations commented 12 years ago

Commented by: Beto Neto (betoneto.tbo)

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

firebird-automations commented 12 years ago

Commented by: Alexey Pavlov (alexx83)

I have the same issue with Firebird-2.5.1,2.5.2 on Windows Vista and Windows 7

firebird-automations commented 12 years ago

Commented by: ZERROUKI (moyzer)

- 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.

firebird-automations commented 11 years ago

Commented by: Treppen (treppen123)

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.

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

firebird-automations commented 11 years ago

Commented by: ZERROUKI (moyzer)

@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); begin

UIBDataBase1.Connected:=False;

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;

UIBDataBase1.DatabaseName:=MyDataBasePath; try UIBDataBase1.Connected; Except end;

end;

_________________________________ uses windows, SHFOLDER;

function GetProgramFilesDir : string; begin result:=GetSpecialFolderPath(SHFOLDER.CSIDL_PROGRAM_FILES);
end;

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

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

All the Best...