Maelstorm Posted March 1, 2005 Share Posted March 1, 2005 Is there a way to find out what the current video resolution is in Windows? I'm running a script that needs to know that the current resolution is. In the workstation, I found a regkey that changes values when the resolution changes, but this is missing on another machine. So, it seems that the value is machine specific and quite possibly installation specific.So, how do we do it? Link to comment Share on other sites More sharing options...
sixpack Posted March 1, 2005 Share Posted March 1, 2005 http://www.robvanderwoude.com/index.htmlscrol down to the middel of the page Link to comment Share on other sites More sharing options...
PeonPower Posted March 1, 2005 Share Posted March 1, 2005 This is a simple vbs script which echoes the height and widthOn Error Resume NextConst wbemFlagReturnImmediately = &h10Const wbemFlagForwardOnly = &h20strComputer = "localhost"Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_DesktopMonitor", "WQL", _wbemFlagReturnImmediately + wbemFlagForwardOnly)For Each objItem In colItems WScript.Echo "ScreenHeight: " & objItem.ScreenHeight WScript.Echo "ScreenWidth: " & objItem.ScreenWidthNext Link to comment Share on other sites More sharing options...
Maelstorm Posted March 1, 2005 Author Share Posted March 1, 2005 http://www.robvanderwoude.com/index.htmlscrol down to the middel of the page<{POST_SNAPBACK}>That was one of the first sites I found when searching. The script doesn't work on XP even though there are 3 different versions of it.Thanks for responding though. Link to comment Share on other sites More sharing options...
Maelstorm Posted March 1, 2005 Author Share Posted March 1, 2005 This is a simple vbs script which echoes the height and widthThat was exactly what I was looking for.Domo Arigato Gozaimasu Link to comment Share on other sites More sharing options...
PeonPower Posted March 2, 2005 Share Posted March 2, 2005 Thank Scriptomatic 2.0 =]Very useful program, select the class you need and it'll show a script that echoes all of the information of that class. Easy =] Link to comment Share on other sites More sharing options...
Martin Zugec Posted March 2, 2005 Share Posted March 2, 2005 Yep, I like whole "matic" family... Adsimatic, scriptomatic and tweakomatic... I think U could use wmic also, like wmic desktop get screenwidth, screenheight Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now