I need a script to copy a specific image depending on the screen resolution being used.
so far I've found that wmic desktopmonitor get screenheight
is giving me the appropriate output but i'm having trouble parsing it to a useable variable
the problem is that the output is on three lines and I only need the information from the second one.
Can anyone help?
You can even get more parameters with one single
wmic
:If you need to have your own variablenames, it's a bit more complicated:
if you need only one value:
@Stephan's answer modified to be compatible with all windows versions (including Windows 8):