in reply to Finding OS Version and Win2K8

use Win32; print Win32::GetOSVersion; print Win32::GetOSName;

See http://cpan.uwinnipeg.ca/htdocs/Win32/Win32.html#Win32_GetOSVersion for details.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^2: Finding OS Version and Win2K8
by Burak (Chaplain) on May 23, 2008 at 08:26 UTC
    I think Win32::GetOSName() does not support 2008 yet and you need to keep Win32 recent for that since Win32::GetOSName() also (like Sys::Info) uses hard coded names and checks the OS version. The manual way is to check Major & Minor from Win32::GetOSVersion()
      FYI...

      Both Win32::GetOSName and Sys::Info return "WinVista", not "Win2008".

      The only way I've been able to determine if the system I'm on is Windows 2008 is by running that really long script using Win32::OLE in the example at the top of the thread.

      I guess I'll just stick with that one for the time being. Thank you to all who replied!!! Mark