There is a function in the UDFs called GetScreenRes, but it doesn't support remote computers. Loosely based on GetScreenRes and using Kixomatic, this should get you going.

? screenres()
;? screenres("RemoteComputerName") 
 
Function ScreenRes(optional $remotecomputer) if $remotecomputer="" $strComputer = "." endif $objWMIService = GetObject("winmgmts:\\" + $strComputer + "\root\cimv2") if $objwmiservice $colItems = $objWMIService.ExecQuery("Select * from Win32_VideoController",,48) For each $objItem in $colItems if $ScreenRes="" $screenres=trim(split($objItem.VideoModeDescription,"x")[0]) + "x" + trim(split($objItem.VideoModeDescription,"x")[1]) endif Next if $screenres exit 0 else exit -1 else exit @error endif endfunction


Do a search for kixomatic if you would like to see how easy it is to build scripts with wmi. Your second post/vbscript is more direct... I'll see what I can do.


Edited by Allen (2008-08-04 04:30 AM)