Link to home
Start Free TrialLog in
Avatar of aelabed
aelabed

asked on

how to copy qtintf.dll to system directory when .exe delphi runs?

assalamo alekom,
hello friends..
1) I want to copy qtintf.dll to the system directory when I double clicked my .exe file on the other computers, independent of the windows version.

2) when I want to open windows directory i use %windir%, but how can i open the system directory and the program files and my documents in the same way?
thanx.
ASKER CERTIFIED SOLUTION
Avatar of ILE
ILE

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Lukasz Lach
Lukasz Lach

var sdir: string;
begin
  SetLength(sdir, 255);
  GetSystemDirectory(PChar(sdir), 255);
  SetLength(sdir, Pos(#0, sdir)-1);
  CopyFile(PChar(ExtractFilePath(Application.Exename)+'qtintf.dll'), PChar(sdir+'\qtintf.dll'), False);
end;

:-)