How to find RAM size by using QTP?

Answer Posted / kishorem89

Dim Wshshell,fso,fo,l
''Open the CMD Prompt
set WshShell = CreateObject("WScript.Shell")
SystemUtil.run "cmd.exe"
wait(2)
'cmd="systeminfo |find"
'cmd1="Total Physical Memory:"
'WshShell.SendKeys cmd &" "&"""" &cmd1&""""
WshShell.SendKeys "systeminfo |find"&" "&""""&"Total
Physical Memory:"&""""&">D:\Sys.txt"
WshShell.SendKeys "~"
wait(3)

WshShell.SendKeys "exit"
WshShell.SendKeys "~"


Set
fso=createobject("scripting.filesystemobject")
Set
fo=fso.opentextfile("D:\Sys.txt")
While
fo.AtEndOfStream<>true

l=fo.readline
MsgBox l
wend
fo.close
set fo=nothing
set fso=nothing

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What we are looking for is to load properties of object dynamically as for our application the global repository will pretty huge. It will be really helpful to us if something similar to following functions of Winrunner is available in QTP. #Define descriptor auto strDesc; #set property in the descriptor Gui_desc_set_attr(strDesc,?Class?,?Edit?); --- put other properties #Add Edit box to GUI Map Gui_add(? ?,strWindowName,strEditboxName,strDesc);

3797


Does QTP have any limitations?Can it work with all kinds of programming languages like java,springs,ajax ,hybernet?Also does it work well with windows 7.What are its other limitations

2001


For which type of projects the iterative model is not suitable?

1703


what is meant by source control?

1936


How to export quicktest professional (qtp) results to an .xls file?

841


How to make qtp understand the difference amongst the same type of objects .suppose there are 5 check boxes in a page and I have to choose the 2nd one, how to do that through script?

773


There are 10 rows in the datatable. How can we fetch 2 rows and then skip 3rd row. After that, pick 4th & 5th row and skip 6th row. Please share code

1487


Plz Explain How to access Or Store Script from VSS? Explain Real time work (qtp) where you store folders and next to how to you access that folders and how you maintain folders in VSS ? What are the Menu's in VSS? Suppose in Manual, by using Checkin Checkout u can access documents. how you access in QTp REal time?

1836


Hi All, we are using QTP Automation Scripts to test SAP. I recorded QTP Automation Scripts in English-based SAP GUI. Now we have to test a French-based SAP sytem and use the same scripts. The QTP scripts are failing when executed on the French-based SAP System due to Object Recognition Issues. What can we do? Do I re-record the scripts in the French-based SAP system?

2598


How many types of actions are there in quicktest professional?

770


Hi Samrat, Thank u very much, what u said it is right.

1688


What is QTP’s model for test creation?

915


What is parameter in qtp?

875


how can i pass a "automation script" as a parameter in a function give me need full suggestion thank inadvance

1697


Where you are storing your script?

862