獲取當前操作系統的軟件版本

來源:文萃谷 2.4W

1usingSystem;

獲取當前操作系統的軟件版本

ric;

onentModel;

;

ing;

;

s;

32;

9

10namespaceReg4U

11{

12publicpartialclassForm1:Form

13{

14publicForm1()

15{

16InitializeComponent();

17}

18

19privatevoidbutton1_Click(objectsender,EventArgse)

20{

21RegistryKeyrk;

22rk=SubKey("SoftwareMicrosoftWindowsNTCurrentVersion");

23strings="當前操作系統版本:"alue("ProdUCtName")ring();

24s=s""alue("CSDVersion")ring();

25s=s"當前操作系統安裝序列號:"alue("ProductId")ring();

26s=s"當前系統版本號:"alue("CurrentBuildNumber")ring();

e();

=""s;

29}

30

31privatevoidForm1_Load(objectsender,EventArgse)

32{

33RegistryKeyrk;

34rk=SubKey("SoftwareMicrosoftWindowsNTCurrentVersion");

35strings=alue("ProductName")ring();

36if(tch(s,"windows2000"))

37{

="您的操作系統是2K,恭喜您,你的當前系統適合本軟件的使用!";

39}

e();

41}

42}

43}

熱門標籤