write a program to display the system specifications of
client system with the help of vb script.



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

Post New Answer

More VB Script Interview Questions

what is the differenece btwn scripting language and programming language

4 Answers  


Which object is used to work with the database in the vbscript language and what statement is used to create this object?

0 Answers  


did any one attended interview in applabs if you had gone through plz tell me the procedure

0 Answers  


what types of bugs will we find out in banking projects for automation testing?

0 Answers   Napier Healthcare, TCS,


How will you trim the spaces on the left of a string using vbscript?

1 Answers  






Write a Script for ATM in QTP

0 Answers  


Write a Program to add 2 numbers without using operators (+,-) and without using third variable. Note: Use VBScript only Hint: You can use other operators like '/' & '*'(Division & Multiplication)

0 Answers   Quest,


What are the special sub-types in vbscript?

0 Answers  


what is event handling?

0 Answers  


write a vb script to rename a folder from tree4 to tree7

3 Answers  


I need help to write a function in vbscript to click on a link. That link looks like a tab. There are 6 tabs. When I click on 1 tab it should show as "on". when I spy the class property is on. But for the one which is not clicked the class property is blank. I have objects created in our custom object repository. Please give me some idea.

1 Answers  


what is visual basic?

2 Answers   Seion Infotech,


Categories