nico7nibor has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks,
I am having trouble getting the OS NT, Vista and Windows 7
This is how a portion of my code looks
($string, $major, $minor, $osbuild, $id) = Win32::GetOSVersion (); $os = ""; if ($DEBUG >= 2) { print "ID = $id\n"; } if ($id == 0) { print "Unable to determine win32s!"; } $os = { 1 => { 0 => "95", 10 => "98", 90 => "Me" }, 2 => { 0 => "2000", 1 => "XP/.Net", 2 => "Server 2003", 51 => "NT3.51" } }->{$id}->{$minor};
how can i get Oses NT 4 and Vista when they have the same minor and id with 2000, Also does the functionality supports Windows 7 OS?
second problem is i have to split the result into two. I need to compare the result to update a file to all Oses under $major <= 4, While the other split will depend on $major >=5 in which a different file is processed for the remaning Oses
Im really confused of what flow i have to implement. much thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: split OSVersion in two categories
by ikegami (Patriarch) on Nov 20, 2009 at 06:50 UTC | |
by nico7nibor (Novice) on Nov 20, 2009 at 08:05 UTC | |
by ikegami (Patriarch) on Nov 20, 2009 at 16:15 UTC | |
by nico7nibor (Novice) on Nov 23, 2009 at 03:42 UTC | |
by ikegami (Patriarch) on Nov 23, 2009 at 04:02 UTC | |
|
Re: split OSVersion in two categories
by bichonfrise74 (Vicar) on Nov 20, 2009 at 06:07 UTC | |
by Anonymous Monk on Nov 20, 2009 at 07:28 UTC |