'
' コンピュータ名を取得
'
Option Explicit
Dim oWMIService
Dim oItems
Dim oItem
Dim sComputer
sComputer = "."
Set oWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & sComputer & "\root\cimv2")
Set oItems = oWMIService.ExecQuery("Select * From Win32_OperatingSystem")
For Each oItem in oItems
WScript.Echo oItem.CSName
Next
Set oItem = Nothing
Set oItems = Nothing
Set oWMIService = Nothing
0 件のコメント:
コメントを投稿