自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

VB.NET實(shí)例教程之查詢系統(tǒng)啟動(dòng)信息案例剖析

開發(fā) 后端
VB.NET實(shí)例教程列舉了一個(gè)VB.Net查詢系統(tǒng)啟動(dòng)信息的實(shí)例,有圖文解釋和代碼解釋,看了一定會給你帶來很大的幫助的。

在網(wǎng)上看到大家對VB.Net調(diào)用WMI實(shí)現(xiàn)系統(tǒng)管理都很感興趣,在此呢VB實(shí)例教程來教你VB.NET如何調(diào)用WMI來實(shí)現(xiàn)系統(tǒng)管理和系統(tǒng)信息查詢等問題的解決! 趕快看看吧!

VB.Net調(diào)用WMI可以實(shí)現(xiàn)系統(tǒng)管理和系統(tǒng)信息查詢等。WMI全稱為Windows Management Instrumentation,利用WMI我們可以實(shí)現(xiàn)很多系統(tǒng)管理的功能,msdn在.Net Framework類庫中對此描述比較簡單(因?yàn)樵缙赪MI相關(guān)專題有所較詳盡描述,故類庫中未再詳細(xì)解說與演示)。

開發(fā)環(huán)境: VB2005  Windows2003

本實(shí)例需要在菜單欄中的“項(xiàng)目”-“ 添加引用” -“ System.Management”并在實(shí)例代碼中導(dǎo)入引用的項(xiàng)目和程序集中定義的命名空間或編程元素 即: Imports System.Management  

VB.NET實(shí)例教程之VB.NET查詢系統(tǒng)啟動(dòng)信息的實(shí)例

代碼如下:

  1. Private Sub Lobdotcn()  
  2. Dim Lob_Searcher As New ManagementObjectSearcher("root\CIMV2", "SELECT * FROM Win32_BootConfiguration")  
  3. For Each Obj_Query As ManagementObject In Lob_Searcher.Get()  
  4. ListBox1.Items.Add("樂博網(wǎng)LOB.Cn   VB.Net愛好者的組織")  
  5. ListBox1.Items.Add("BootDirectory: " & Obj_Query("BootDirectory"))  
  6. ListBox1.Items.Add("Caption: " & Obj_Query("Caption"))  
  7. ListBox1.Items.Add("ConfigurationPath: " & Obj_Query("ConfigurationPath"))  
  8. ListBox1.Items.Add("Description: " & Obj_Query("Description"))  
  9. ListBox1.Items.Add("LastDrive: " & Obj_Query("LastDrive"))  
  10. ListBox1.Items.Add("Name: " & Obj_Query("Name"))  
  11. ListBox1.Items.Add("ScratchDirectory: " & Obj_Query("ScratchDirectory"))  
  12. ListBox1.Items.Add("SettingID: " & Obj_Query("SettingID"))  
  13. ListBox1.Items.Add("TempDirectory: " & Obj_Query("TempDirectory"))  
  14. Next  
  15. End Sub 


相關(guān)屬性說明:

  1. BootDirectory   
  2. Data type: string  
  3. Access type: Read-only   
  4. Path to the system files required for booting the system.  
  5. Example: "C:\Windows"  
  6. Caption   
  7. Data type: string  
  8. Access type: Read-only  
  9. Qualifiers: MaxLen(64)   
  10. Short description (one-line string) of the CIM_Setting object. This property is inherited from CIM_Setting.  
  11. ConfigurationPath   
  12. Data type: string  
  13. Access type: Read-only   
  14. Path to the configuration files. This value may be similar to the value in the BootDirectory property.  
  15. Description   
  16. Data type: string  
  17. Access type: Read-only   
  18. Description of the CIM_Setting object. This property is inherited from CIM_Setting.  
  19. LastDrive   
  20. Data type: string  
  21. Access type: Read-only   
  22. Last drive letter to which a physical drive is assigned.  
  23. Example: "E:"  
  24. Name   
  25. Data type: string  
  26. Access type: Read-only  
  27. Qualifiers: Key, MaxLen(256)   
  28. Name of the boot configuration. It is an identifier for the boot configuration.  
  29. ScratchDirectory   
  30. Data type: string  
  31. Access type: Read-only   
  32. Directory where temporary files can reside during boot time.  
  33. SettingID   
  34. Data type: string  
  35. Access type: Read-only  
  36. Qualifiers: MaxLen(256)   
  37. Identifier by which the CIM_Setting object is known. This property is inherited from CIM_Setting.  
  38. TempDirectory   
  39. Data type: string  
  40. Access type: Read-only   
  41. Directory where temporary files are stored.  
  42. Example: "C:\TEMP" 

以上就是VB.NET實(shí)例教程中VB.NET查詢系統(tǒng)啟動(dòng)信息的實(shí)例講解,以后還會對VB.NET很多問題進(jìn)行講解,希望即時(shí)關(guān)注。

【編輯推薦】

  1. 剖析VB.NET平臺調(diào)用是如何執(zhí)行操作
  2. 分享個(gè)人總結(jié)VB.NET多線程
  3. 詳細(xì)說明VB.NET變量中四點(diǎn)
  4. 三類十二種VB.NET數(shù)據(jù)類型全面介紹
  5. VB.NET初步知識,初學(xué)者必看
責(zé)任編輯:田樹 來源: 樂博網(wǎng)
相關(guān)推薦

2009-10-23 16:27:10

VB.NET實(shí)例教程

2009-10-27 15:49:11

VB.NET分辯率

2009-10-28 11:27:34

VB.NET資源文件

2009-07-30 14:18:02

ASP.NET實(shí)例教程

2009-10-21 16:00:26

VB.NET CASE

2009-10-23 13:14:38

2009-10-29 14:02:24

VB和VB.NET比較

2009-10-23 15:35:42

VB.NET實(shí)用教程

2009-11-02 16:55:50

VB.NET Smar

2009-10-21 17:03:05

VB實(shí)例教程

2009-10-27 16:52:41

VB.NET文件傳輸

2009-10-13 15:09:19

VB.NET使用Tre

2009-11-02 16:22:16

VB.NET面向?qū)ο?/a>

2009-11-02 15:49:23

VB.NET顯示系統(tǒng)信

2009-10-15 17:50:48

VB.NET調(diào)用API

2009-10-29 11:41:27

VB.NET寫Obje

2010-01-12 11:47:09

VB.NET可選參數(shù)

2010-01-21 12:55:08

VB.NET對象序列

2010-01-19 18:24:29

VB.NET調(diào)用Win

2010-01-14 14:21:07

點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號