Code : Tout sélectionner
function RelocateCertDirWaptBase(Param: String):String;
var
certdir: String;
begin
certdir := ExpandConstant('{param:verify_cert|{#set_verify_cert}}');
if (pos('c:\tranquilit\wapt',lowercase(certdir))=1) then
result := ExpandConstant('{app}')+'\'+copy(certdir,length('c:\tranquilit\wapt')+1,255)
else if (pos('c:\program files (x86)\wapt',lowercase(certdir))=1) then
result := ExpandConstant('{app}')+'\'+copy(certdir,length('c:\program files (x86)\wapt')+1,255)
else if (pos('c:\program files\wapt\',lowercase(certdir))=1) then
result := ExpandConstant('{app}')+'\'+copy(certdir,length('c:\program files\wapt\')+1,255)
else if (pos('c:\wapt\',lowercase(certdir))=1) then
result := ExpandConstant('{app}')+'\'+copy(certdir,length('c:\wapt\')+1,255)
else
result := certdir;
end;
Code : Tout sélectionner
function RelocateCertDirWaptBase(Param: String):String;
var
certdir: String;
begin
certdir := ExpandConstant('{param:verify_cert|{#set_verify_cert}}');
if (pos('c:\tranquilit\wapt',lowercase(certdir))=1) then
result := ExpandConstant('{app}')+'\'+copy(certdir,length('c:\tranquilit\wapt')+1,255)
else if (pos('c:\program files (x86)\wapt',lowercase(certdir))=1) then
result := ExpandConstant('{app}')+'\'+copy(certdir,length('c:\program files (x86)\wapt')+1,255)
else if (pos('c:\program files\wapt\',lowercase(certdir))=1) then
result := ExpandConstant('{app}')+'\'+copy(certdir,length('c:\program files\wapt\')+1,255)
else if (pos('c:\wapt\',lowercase(certdir))=1) then
result := ExpandConstant('{app}')+'\'+copy(certdir,length('c:\wapt\')+1,255)
else if (pos('d:\wapt\',lowercase(certdir))=1) then
result := ExpandConstant('{app}')+'\'+copy(certdir,length('d:\wapt\')+1,255)
else
result := certdir;
end;