write a program to display the system specifications of
client system with the help of vb script.
Answer / vasanth
Sub Screen_Resolution
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer
& "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * From
Win32_DisplayConfiguration")
For Each objItem in colItems
'msgbox "Name: " & objItem.DeviceName
'msgbox "Color depth: " & objItem.BitsPerPel
'msgbox "Horizontal resolution: " & objItem.PelsWidth
'msgbox "Vertical resolution: " & objItem.PelsHeight
If objItem.PelsWidth <> 1024 Or objItem.PelsHeight <> 768
Then
MsgBox "Current screen resolution is "
&objItem.PelsWidth& " by " &objItem.PelsHeight
MsgBox "Scripts cannnot be executed, We only support 1024
by 768 "
ExitAction()
End if
Next
End Sub
| Is This Answer Correct ? | 0 Yes | 0 No |
Which object provide information about a single runtime error in a vbscript?
In what way program "hello world" you can write in vbscript?
how to add the shared repository file to the script file while running the script manuall
Could Anybody Please tell me What is the script for Find 3rd Largest element in the Array without using a SORT function int Find(int arr[], int size); Thanks in Advance..
Explain the scope of the variables using dim, public, and private keywords respectively.
What is byref and byval parameters in vbscript?
write a vb script to display ***** ***** ***** ***** *****
How do you write an SQL insert statement?
In html file what is an ideal position to include vbscript?
What purpose does ‘on error resume next’ serves?
Explain the arrays in vb script?
Which function is used to perform string comparison?