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

Which keyword is used to declare a variable in the vbscript language?

0 Answers  


what is the code in QTP to take screen shot? Please send me any one to my mail id. my mailid is manu.sanepalli@gmail.com

4 Answers   TCS,


how to add action through AOM in QTP

0 Answers  


Mention what is the technology used by vb script?

0 Answers  


How to create a function in vbscript?

0 Answers  






How will you get the largest subscript of an array in vbscript?

0 Answers  


What are the advantages of vbscript?

0 Answers  


How can I write HTML text to the window in VB Script?

2 Answers  


I want to import the sheet from the Excel to the Datatable using VB Script. I used the Syntax as 'Datatable.ImportSheet "Filename","SourceSheet","Destinat ionSheet" Ex: Datatable.ImportSheet "D:\Data1.xls","Sheet1","Global" Qtp producing run time error,How I can solve the problem

1 Answers  


How to pass the parameter from one function to another function in VB Scripting?

1 Answers   Fastenal,


Explain about adodb.stream class?

0 Answers  


Plzzzzzzz can any one tell me which is the best institute in hyderabad for learing VBScript. plz do answer guys its urgent plzzzzzzz. thanks in advance.

0 Answers  


Categories