Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
firebird-automations opened this issue Apr 25, 2012 · 8 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: ZERROUKI (moyzer)

Votes: 2

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

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

Component: Installation [ 10012 ]

Component: API / Client Library [ 10040 ] =>

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

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

@firebird-automations
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant