Hi everyone, I fairly new to vbs and I'm trying to get an idea I have to work by piecing together scripts and hoping for the best . I don't know to much about writing the script but I understand the basic principles of programing and the general flow of how a script should work.

So here it goes I'm looking to make a script that will query the display properties and set the resolution to variables. It will then use those stored variables in a web link and open the link. So basically a computer has its resolution 1280 x 1024 the script will read that and then open a web link in the following format:


I need the width and the height to be populated by the variables it reads off the pc.

So far I have found some code that will read the resolution and display the info in gui boxes:

strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery _
("Select * From Win32_DisplayConfiguration")

For Each objItem in colItems
Wscript.Echo "Name: " & objItem.DeviceName
Wscript.Echo "Color depth: " & objItem.BitsPerPel
Wscript.Echo "Horizontal resolution: " & objItem.PelsWidth
Wscript.Echo "Vertical resolution: " & objItem.PelsHeight

Set colItems = objWMIService.ExecQuery _
("Select * From Win32_DisplayConfiguration")

And I also found some code to open a web link:

strURL = ""
Set objShell = CreateObject("Wscript.Shell")

So I'm a newb like I said and I need a solution. I'm missing what I need as far as populating variables. Do I need an Array to store what the code gets from that file? I'm very lost any help is much appreciated.