1

How can the the BITS (Background Intelligent Transfer Service) version be retrieved using C# .NET 4.0.

TheWolf
  • 1,675
  • 4
  • 22
  • 34
  • 1
    You must not have done much research before asking; first Google hit: [Determining the Version of BITS on a Computer](http://msdn.microsoft.com/en-us/library/windows/desktop/aa362837(v=vs.85).aspx). – M.Babcock Jan 16 '12 at 19:39

1 Answers1

0

I basically retrieved the dll version of QMgr.dll in System32, since this is the dll for BITS.

const string bitsDll = "QMgr.dll";

var bitsDllInfo = FileVersionInfo.GetVersionInfo(Path
    .Combine(System.Environment.SystemDirectory, bitsDll));

updateDeliveryStatusRequest.BitsVersion = bitsDllInfo.FileVersion;
TheWolf
  • 1,675
  • 4
  • 22
  • 34