中央論壇 - CENTER BBS

標題: 用WMI列出可用的顯示模式並寫入文字檔 [打印本頁]

作者: f66666602    時間: 2007-7-27 20:58
標題: 用WMI列出可用的顯示模式並寫入文字檔
Set fs = CreateObject("Scripting.FileSystemObject")
Set outFile = fs.CreateTextFile("VideoController.txt", True)
For each Item in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("Win32_VideoController")
outFile.WriteLine("Caption: " & Item.Caption)
outFile.WriteLine("CurrentHorizontalResolution: " & Item.CurrentHorizontalResolution)
outFile.WriteLine("CurrentVerticalResolution: " & Item.CurrentVerticalResolution)
outFile.WriteLine("CurrentNumberOfColors: " & Item.CurrentNumberOfColors)
outFile.WriteLine("")
Next
outFile.Close
        iYear = Mid(sDate, 1, 4)
        FromWMIDate = iDay & "/" & iMonth & "/" & iYear
End Function




歡迎光臨 中央論壇 - CENTER BBS (https://www.centerbbs.com/) Powered by Discuz! X3