Files
Brandon Arvanaghi a8e41cba84 Restructured folders
2017-08-05 09:40:40 -04:00

21 lines
578 B
Perl

#
# Minimum number of browsers, Perl
# Module written by Brandon Arvanaghi
# Website: arvanaghi.com
# Twitter: @arvanaghi
#
use Win32::OLE qw(EVENTS HRESULT in);
my $wmiCIM = Win32::OLE->GetObject("WINMGMTS://./root/CIMv2");
my $RAM_running_total = 0;
foreach my $subMem (in($wmiCIM->InstancesOf('Win32_PhysicalMemory'))) {
$RAM_running_total += $subMem->{Capacity};
}
if ($RAM_running_total/1073741824 > 1) {
print "The RAM of this host is at least 1 GB in size. Proceed!\n";
} else {
print "Less than 1 GB of RAM exists on this system. Do not proceed.\n"
}