<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Script Repository</title>
	<atom:link href="http://www.roth.net/blog/index.php/script-repository/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.roth.net/blog</link>
	<description>Helping the Perl world cope with Windows</description>
	<lastBuildDate>Wed, 20 Jan 2010 09:22:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: dineshkhanna</title>
		<link>http://www.roth.net/blog/index.php/script-repository/comment-page-1/#comment-1077</link>
		<dc:creator>dineshkhanna</dc:creator>
		<pubDate>Wed, 20 Jan 2010 09:22:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.roth.net/forums/?page_id=3#comment-1077</guid>
		<description>Need help in Perl scripting to get system details in windows XP operating system.Currently I am using win32 class to get the system details like RAM size, processor speed  ,Hard disk capacity and fetching the list of installed software.I would like to write the Perl script to get the above system details without using win32 class.
I will be great if you could able to guide me to write the Perl script to get the above system details without using win32 class.
Below is the sample code which I am currently using to get Hard Disk capacity in Perl,
use strict;
use Win32::OLE(&#039;in&#039;);
use constant wbemFlagReturnImmediately =&gt; 0x10;
use constant wbemFlagForwardOnly =&gt; 0x20;
my @computers = ($_[0]);
foreach my $computer (@computers) 
{
                                                my $objWMIService = Win32::OLE-&gt;GetObject(&quot;winmgmts:\\\\$computer\\root\\CIMV2&quot;) or die &quot;WMI connection failed.\n&quot;;
                                                my $colItems = $objWMIService-&gt;ExecQuery(&quot;SELECT * FROM Win32_DiskDrive&quot;, &quot;WQL&quot;,
                                                wbemFlagReturnImmediately &#124; wbemFlagForwardOnly);
                                                foreach my $objItem (in $colItems) 
                                                {
                                                                print &quot;\n&quot;;
                                                                print &quot;Hard Disk capacity : $objItem-&gt;{Size}\n&quot;;
                                                                print &quot;\n&quot;;
                                                }
                                }</description>
		<content:encoded><![CDATA[<p>Need help in Perl scripting to get system details in windows XP operating system.Currently I am using win32 class to get the system details like RAM size, processor speed  ,Hard disk capacity and fetching the list of installed software.I would like to write the Perl script to get the above system details without using win32 class.<br />
I will be great if you could able to guide me to write the Perl script to get the above system details without using win32 class.<br />
Below is the sample code which I am currently using to get Hard Disk capacity in Perl,<br />
use strict;<br />
use Win32::OLE(&#8216;in&#8217;);<br />
use constant wbemFlagReturnImmediately =&gt; 0&#215;10;<br />
use constant wbemFlagForwardOnly =&gt; 0&#215;20;<br />
my @computers = ($_[0]);<br />
foreach my $computer (@computers)<br />
{<br />
                                                my $objWMIService = Win32::OLE-&gt;GetObject(&#8220;winmgmts:\\\\$computer\\root\\CIMV2&#8243;) or die &#8220;WMI connection failed.\n&#8221;;<br />
                                                my $colItems = $objWMIService-&gt;ExecQuery(&#8220;SELECT * FROM Win32_DiskDrive&#8221;, &#8220;WQL&#8221;,<br />
                                                wbemFlagReturnImmediately | wbemFlagForwardOnly);<br />
                                                foreach my $objItem (in $colItems)<br />
                                                {<br />
                                                                print &#8220;\n&#8221;;<br />
                                                                print &#8220;Hard Disk capacity : $objItem-&gt;{Size}\n&#8221;;<br />
                                                                print &#8220;\n&#8221;;<br />
                                                }<br />
                                }</p>
]]></content:encoded>
	</item>
</channel>
</rss>
