On Wed, 23 May 2007, Sisyphus wrote:
> The Win32 documentation (wrt Win32::GetOSVersion) states:
> 
> -------------------------------------
>  Win32::GetOSVersion()
>      [CORE] Returns the list (STRING, MAJOR, MINOR, BUILD, ID), ...
> .
> .
> Currently known values for ID MAJOR and MINOR are as follows:
> 
>     OS                    ID    MAJOR   MINOR
>     Win32s                 0      -       -
>     Windows 95             1      4       0
>     Windows 98             1      4      10
>     Windows Me             1      4      90
>     Windows NT 3.51        2      3      51
>     Windows NT 4           2      4       0
>     Windows 2000           2      5       0
>     Windows XP             2      5       1
>     Windows Server 2003    2      5       2
>     Windows Vista          2      6       0

You are overlooking this part of the docs:

       On Windows NT 4 SP6 and later this function returns the following
       additional values: SPMAJOR, SPMINOR, SUITEMASK, PRODUCTTYPE.

> -------------------------------------
> 
> I'm running Vista64, so I expect the following one liner to print out "2 6
> 0":
> 
> C:\_64\C>perl -e "@s = Win32::GetOSVersion; print \"$s[-1] $s[1] $s[2]\""
> 
> But it prints out "1 6 0".
> 
> Does anyone know what's going on ? (This is using the 64-bit build of AS 820
> on an AMD64 box.)

You are printing the PRODUCTTYPE value instead of the ID.  Use $s[4] instead
of $s[-1].

Cheers,
-Jan


_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to