搜索
熱搜: 活動 交友 discuz
查看: 1977|回復: 0
打印 上一主題 下一主題

用WMI列出電腦資訊(與控制台中的系統一樣)並寫入文字檔

[複製鏈接]
跳轉到指定樓層
1#
發表於 2007-7-27 20:57:24 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
Set fs = CreateObject("Scripting.FileSystemObject")
Set outFile = fs.CreateTextFile("compsys.txt", True)
For each Item in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("Win32_ComputerSystem")
outFile.WriteLine("Caption: " & Item.Caption)
outFile.WriteLine("PrimaryOwnerName: " & Item.PrimaryOwnerName)
outFile.WriteLine("Domain: " & Item.Domain)
outFile.WriteLine("DomainRole: " & Item.DomainRole)
outFile.WriteLine("Manufacturer: " & Item.Manufacturer)
outFile.WriteLine("Model: " & Item.Model)
outFile.WriteLine("NumberofProcessors: " & Item.NumberofProcessors)
outFile.WriteLine("SystemType: " & Item.SystemType)
outFile.WriteLine("SystemStartupDelay: " & Item.SystemStartupDelay)
outFile.WriteLine("TotalPhysicalMemory: " & Item.TotalPhysicalMemory)
outFile.WriteLine("")
Next
outFile.Close
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

本論壇為非營利之網路平台,所有文章內容均為網友自行發表,不代表論壇立場!若涉及侵權、違法等情事,請告知版主處理。


Page Rank Check

廣告刊登  |   交換連結  |   贊助我們  |   服務條款  |   免責聲明  |   客服中心  |   中央分站

手機版|中央論壇

GMT+8, 2024-4-29 07:22 , Processed in 0.175415 second(s), 16 queries .

Powered by Discuz!

© 2005-2015 Copyrights. Set by YIDAS

快速回復 返回頂部 返回列表