Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for videorom.kix

(view source code of videorom.kix as plain text)

  1. ; Check KiXtart version
  2. $KixMajorVer = SubStr( @Kix, 1, InStr( @Kix, "." ) - 1 )
  3. If $KixMajorVer < 4
  4. 	GoTo Syntax
  5. EndIf
  6.  
  7. ; Header line for screen output
  8. ? "Video summary for @WKSTA:"
  9. ?
  10.  
  11. ; Connect to specified computer
  12. $objWMIService = GetObject( "winmgmts://./root/cimv2" )
  13. ; Display error number and description if applicable
  14. If @ERROR
  15. 	GoTo ShowError
  16. EndIf
  17.  
  18. ; Query processor properties
  19. $colItems = $objWMIService.ExecQuery( "Select * from Win32_VideoController", , 48 )
  20. ; Display error number and description if applicable
  21. If @ERROR
  22. 	GoTo ShowError
  23. EndIf
  24. ; Display results
  25. For Each $objItem in $colItems
  26. 	? "    Name:                    " + $objItem.Name
  27. 	? "    Description:             " + $objItem.Description
  28. 	? "    Video Processor:         " + $objItem.VideoProcessor
  29. 	? "    Adapter RAM:             " + ( $objItem.AdapterRAM + 524288 ) / 1048576 + " MB"
  30. 	? "    Video Mode Description:  " + $objItem.VideoModeDescription
  31. 	?
  32. Next
  33.  
  34. ; Done
  35. Quit 0
  36.  
  37.  
  38. :ShowError
  39. ? "Error # @ERROR"
  40.  
  41. :Syntax
  42. ?
  43. ? "VideoROM.kix,  Version 1.10"
  44. ? "Display video adapter summary for local computer"
  45. ?
  46. ? "Usage:  KIX32  VIDEOROM.KIX"
  47. ?
  48. ? "Written by Rob van der Woude"
  49. ? "http://www.robvanderwoude.com"
  50. ?
  51. ? "This script requires KiXtart 4.00 or later."
  52. ? "Your KiXtart version is @Kix"
  53. ?
  54. Quit 1
  55.  

page last modified: 2024-04-16; loaded in 0.0069 seconds