Hi Hans,
Interesting question. There is no built-in way to get that information, but we can leverage the SendFileVersionInfo method in the TCodeSiteLogger. For example, the following code shows how to get the file path to the CSDispatcher.exe from the Registry and then use the SendFileVersionInfo method to send the version info the CodeSite destination. The version number is listed in the details. Perhaps this will help until I can put something a little more elegant into the product.
Ray
uses
System.Win.Registry,
CodeSiteLogging,
CodeSitePlatform;
procedure TForm45.RzButton1Click(Sender: TObject);
var
R: TRegistry;
DispatcherFileName: string;
begin
R := TRegistry.Create;
try
R.RootKey := HKEY_LOCAL_MACHINE;
if R.OpenKeyReadOnly( CodeSiteRegKey ) then
DispatcherFileName := R.ReadString( 'Dispatcher' )
else if R.OpenKeyReadOnly( CodeSitePoliciesRegKey ) then
DispatcherFileName := R.ReadString( 'Dispatcher' );
R.CloseKey;
finally
R.Free;
end;
if DispatcherFileName = '' then
DispatcherFileName := StrDispatcherExeName;
CodeSite.SendFileVersionInfo( DispatcherFileName );
end;