WSH/VBScriptでCPU情報を取得する方法
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
#navi(../)
* VBScriptでCPU名、CPU使用率、CPUクロックを取得する方法 [...
本資料は、VBScriptでCPUの各種情報を取得するサンプルスクリ...
#contents
#htmlinsertpcsp(win-top.html,win-sp.html)
* CPU情報を取得する [#y2bf7b97]
以下のサンプルスクリプトでCPU情報を取得することができます...
サンプルスクリプトでは、CPU名、CPU使用率、CPUクロックを取...
#ref(cpu.zip)
Option Explicit
Dim oClassSet, oClass, oLocator, oService
Dim szMsg
Set oLocator = WScript.CreateObject("WbemScripting.SWbem...
Set oService = oLocator.ConnectServer
Set oClassSet = oService.ExecQuery("SELECT * FROM Win32_...
For Each oClass In oClassSet
MsgBox "CPU Name: " & oClass.Name & vbCrLF & _
"CPU Usage[%]: " & oClass.LoadPercentage & vbCr...
"CPU Clock : " & oClass.CurrentClockSpeed
Next
Set oClassSet = Nothing
Set oClass = Nothing
Set oService = Nothing
Set oLocator = Nothing
実行結果
#ref(01.png)
以上、VBScriptでCPU情報を取得する方法でした。
#htmlinsertpcsp(win-btm.html,win-sp.html)
終了行:
#navi(../)
* VBScriptでCPU名、CPU使用率、CPUクロックを取得する方法 [...
本資料は、VBScriptでCPUの各種情報を取得するサンプルスクリ...
#contents
#htmlinsertpcsp(win-top.html,win-sp.html)
* CPU情報を取得する [#y2bf7b97]
以下のサンプルスクリプトでCPU情報を取得することができます...
サンプルスクリプトでは、CPU名、CPU使用率、CPUクロックを取...
#ref(cpu.zip)
Option Explicit
Dim oClassSet, oClass, oLocator, oService
Dim szMsg
Set oLocator = WScript.CreateObject("WbemScripting.SWbem...
Set oService = oLocator.ConnectServer
Set oClassSet = oService.ExecQuery("SELECT * FROM Win32_...
For Each oClass In oClassSet
MsgBox "CPU Name: " & oClass.Name & vbCrLF & _
"CPU Usage[%]: " & oClass.LoadPercentage & vbCr...
"CPU Clock : " & oClass.CurrentClockSpeed
Next
Set oClassSet = Nothing
Set oClass = Nothing
Set oService = Nothing
Set oLocator = Nothing
実行結果
#ref(01.png)
以上、VBScriptでCPU情報を取得する方法でした。
#htmlinsertpcsp(win-btm.html,win-sp.html)
ページ名: