in reply to Need windows system info

Try PSInfo from the PSTools toolset from SystemInternals. It should give you all the data you need.

If you want to find the information without executing an external app then you are going to have to locate it in the registry and query it directly.

Replies are listed 'Best First'.
Re^2: Need windows system info
by softworkz (Monk) on Mar 10, 2005 at 20:09 UTC
    I think this will pretty much should get you started
    use strict; use Win32::OLE('in'); use constant wbemFlagReturnImmediately => 0x10; use constant wbemFlagForwardOnly => 0x20; my @computers = ("PUTYOURCOMPUTERNAMEHERE"); foreach my $computer (@computers) { print "\n"; print "==========================================\n"; print "Computer: $computer\n"; print "==========================================\n"; my $objWMIService = Win32::OLE->GetObject("winmgmts:\\\\$computer\\ +root\\CIMV2") or die "WMI connection failed.\n"; my $colItems = $objWMIService->ExecQuery("SELECT * FROM Win32_Opera +tingSystem", "WQL", wbemFlagReturnImmediately | wbemFlagForwardOnly); foreach my $objItem (in $colItems) { print "BootDevice: $objItem->{BootDevice}\n"; print "BuildNumber: $objItem->{BuildNumber}\n"; print "BuildType: $objItem->{BuildType}\n"; print "CreationClassName: $objItem->{CreationClassName}\n"; print "CSCreationClassName: $objItem->{CSCreationClassName}\n"; print "CSDVersion: $objItem->{CSDVersion}\n"; print "FreePhysicalMemory: $objItem->{FreePhysicalMemory}\n"; print "FreeVirtualMemory: $objItem->{FreeVirtualMemory}\n"; print "InstallDate: $objItem->{InstallDate}\n"; print "LastBootUpTime: $objItem->{LastBootUpTime}\n"; print "LocalDateTime: $objItem->{LocalDateTime}\n"; print "Manufacturer: $objItem->{Manufacturer}\n"; print "Name: $objItem->{Name}\n"; print "NumberOfProcesses: $objItem->{NumberOfProcesses}\n"; print "NumberOfUsers: $objItem->{NumberOfUsers}\n"; print "Organization: $objItem->{Organization}\n"; print "OSType: $objItem->{OSType}\n"; print "RegisteredUser: $objItem->{RegisteredUser}\n"; print "SerialNumber: $objItem->{SerialNumber}\n"; print "ServicePackMajorVersion: $objItem->{ServicePackMajorVersi +on}\n"; print "ServicePackMinorVersion: $objItem->{ServicePackMinorVersi +on}\n"; print "Status: $objItem->{Status}\n"; print "SystemDevice: $objItem->{SystemDevice}\n"; print "SystemDirectory: $objItem->{SystemDirectory}\n"; print "Version: $objItem->{Version}\n"; print "WindowsDirectory: $objItem->{WindowsDirectory}\n"; print "\n"; } system("ipconfig /all"); }sub WMIDateStringToDate(strDate) { return "blah"; }