2012-01-16 27 views
0

如何使用C#.NET 4.0检索BITS(后台智能传输服务)版本。在C#中检索BITS版本#

+1

在问你之前,你一定没有做过多的研究;首先谷歌命中:[确定计算机上的BITS的版本](http://msdn.microsoft.com/en-us/library/windows/desktop/aa362837(v = vs.85).aspx)。 – 2012-01-16 19:39:21

回答

0

我基本上检索到System32中的QMgr.dll的DLL版本,因为这是BITS的DLL。

const string bitsDll = "QMgr.dll"; 

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

updateDeliveryStatusRequest.BitsVersion = bitsDllInfo.FileVersion;