Thanks Ravi,

Now i am able to get the exact Ram Size.

Thanks,
Venkat

On Thursday, May 16, 2013 5:00:47 PM UTC+5:30, Ravikiran wrote:
>
> Please check below two codes
> Set objWMIServices = Getobject("winmgmts:\\**localhost\root\cimv2")
> Set objWMIInstances = objWMIServices.InstancesOf ("Win32_ComputerSystem")
> For Each objWMIInstance In objWMIInstances
>     msgbox "RAM in GB= " & (objWMIInstance.**
> TotalPhysicalMemory)/1073741824
> Next
> Set objWMIInstances = Nothing
> Set objWMIServices = Nothing
>  
>
> strComputer = "."   
> Set objWMIService = GetObject("winmgmts:"& 
> "{impersonationLevel=impersonate}!\\"& strComputer & "\root\cimv2") 
> Set colComputer = objWMIService.ExecQuery("Select * from 
> Win32_ComputerSystem") 
>
> For Each objComputer in colComputer 
> msgbox Round(objComputer.TotalPhysicalMemory/(1024*1024*1024),3)
> Next 
>
>
> On Thu, May 16, 2013 at 1:08 PM, Venkat Kandula 
> <[email protected]<javascript:>
> > wrote:
>
>> Hi RaviKiran,
>>
>> When i am executing your script, getting the Ram size 2.137038848 GB but 
>> my PC Ram Size is 1.99 GB
>>
>> Please find the below screen shots
>>
>>
>>
>>
>> On Tuesday, May 14, 2013 6:56:42 PM UTC+5:30, Ravikiran wrote:
>>
>>>  Set objWMIServices = Getobject("winmgmts:\\**localhost\root\cimv2")
>>> Set objWMIInstances = objWMIServices.InstancesOf ("Win32_ComputerSystem")
>>> For Each objWMIInstance In objWMIInstances
>>>     msgbox "RAM in GB= " & (objWMIInstance.**TotalPhysicalMemory)/**
>>> 1000000000
>>> Next
>>> Set objWMIInstances = Nothing
>>> Set objWMIServices = Nothing
>>>
>>>
>>>
>>>  On Tue, May 14, 2013 at 3:52 PM, GOPI <[email protected]> wrote:
>>>
>>>> How to get the RAM SIZE of the computer using QTP/VBscript?
>>>>
>>>> -- 
>>>> -- 
>>>> You received this message because you are subscribed to the Google
>>>> "QTP - HP Quick Test Professional - Automated Software Testing"
>>>> group.
>>>> To post to this group, send email to [email protected] 
>>>>
>>>> To unsubscribe from this group, send email to
>>>> MercuryQTP+...@**googlegroups.com 
>>>>
>>>> For more options, visit this group at
>>>> http://groups.google.com/**group/MercuryQTP?hl=en<http://groups.google.com/group/MercuryQTP?hl=en>
>>>>  
>>>> --- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "QTP - HP Quick Test Professional - Automated Software Testing" 
>>>> group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to mercuryqtp+...@**googlegroups.com. 
>>>>
>>>> For more options, visit 
>>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>>> .
>>>>  
>>>>  
>>>>
>>>
>>>  -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> "QTP - HP Quick Test Professional - Automated Software Testing"
>> group.
>> To post to this group, send email to [email protected]<javascript:>
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/MercuryQTP?hl=en
>>  
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "QTP - HP Quick Test Professional - Automated Software Testing" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

--- 
You received this message because you are subscribed to the Google Groups "QTP 
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to