最新消息

[公告2014/05/30] 如有需要將部落格中,任何一篇文章的程式碼使用在商業用途,請與我聯繫。

[公告2015/04/26] Line版的 iInfo程式與投資應用 群組已上線想加入的朋友們,請先查看 "入群須知" 再與我聯繫 Line : aminwhite5168,加入請告知身分與回答 "入群須知" 的問題。

[公告2018/04/22] 台北 Python + Excel VBA 金融資訊爬蟲課程,課程如網頁內容 金融資訊爬蟲班:台北班 Python 金融資訊爬蟲、EXCEL VBA 金融資訊爬蟲

[公告2019/01/08] 請注意:我再次重申,部落格文章的程式碼,是要提供各位參考與學習,一旦網頁改版請自行修改,別要求東要求西要我主動修改,你們用我寫東西賺錢了、交差了,請問有分我一杯羹嗎?既然賺錢沒分我,請問有什麼理由要求我修改,如果沒能力改,就花錢來找我上課。

[公告2019/12/01] 若各位有 Excel VBA 案子開發需求,歡迎與我聯繫,可接案處理。

[公告2020/05/22] 頁面載入速度慢,起因為部分JS來源(alexgorbatchev.com)失效導致頁面載入變慢,目前已做調整,請多見諒。

2013年6月23日 星期日

WMI取得OS所有相關資訊

最近寫batch需要取得OS資訊,想了想不知用什麼方法,最後找到一個我覺得最適合的方法,就是用WMI取得OS資訊,果然不負眾望可以列出我想要的關鍵資訊。
對於取得OS資訊項目可參考微軟官網 Win32_OperatingSystem class
@echo off
wmic os get BootDevice
wmic os get BuildNumber
wmic os get BuildType
wmic os get Caption
wmic os get CodeSet
wmic os get CountryCode
wmic os get CreationClassName
wmic os get CSCreationClassName
wmic os get CSDVersion
wmic os get CSName
wmic os get CurrentTimeZone
wmic os get DataExecutionPrevention_Available
wmic os get DataExecutionPrevention_32BitApplications
wmic os get DataExecutionPrevention_Drivers
wmic os get DataExecutionPrevention_SupportPolicy
wmic os get Debug
wmic os get Description
wmic os get Distributed
wmic os get EncryptionLevel
wmic os get ForegroundApplicationBoost
wmic os get FreePhysicalMemory
wmic os get FreeSpaceInPagingFiles
wmic os get FreeVirtualMemory
wmic os get InstallDate
wmic os get LargeSystemCache
wmic os get LastBootUpTime
wmic os get LocalDateTime
wmic os get Locale
wmic os get Manufacturer
wmic os get MaxNumberOfProcesses
wmic os get MaxProcessMemorySize
wmic os get MUILanguages
wmic os get Name
wmic os get NumberOfLicensedUsers
wmic os get NumberOfProcesses
wmic os get NumberOfUsers
wmic os get OperatingSystemSKU
wmic os get Organization
wmic os get OSArchitecture
wmic os get OSLanguage
wmic os get OSProductSuite
wmic os get OSType
wmic os get OtherTypeDescription
wmic os get PAEEnabled
wmic os get PlusProductID
wmic os get PlusVersionNumber
wmic os get PortableOperatingSystem
wmic os get Primary
wmic os get ProductType
wmic os get RegisteredUser
wmic os get SerialNumber
wmic os get ServicePackMajorVersion
wmic os get ServicePackMinorVersion
wmic os get SizeStoredInPagingFiles
wmic os get Status
wmic os get SuiteMask
wmic os get SystemDevice
wmic os get SystemDirectory
wmic os get SystemDrive
wmic os get TotalSwapSpaceSize
wmic os get TotalVirtualMemorySize
wmic os get TotalVisibleMemorySize
wmic os get Version
wmic os get WindowsDirectory



沒有留言:

張貼留言