Greetings O’Holy Ones

What is the one and most accurate why to determine the Operating System of a remote M$Windows based server. The reason is; I will be removing or adding Permissions to shared drives resident on remote servers. Depending on the type of OS will determine whether or not to invoke a folder/sub folder recursion routine. Therefore I need to absolutely make sure the type of the OS.
Commands that approximate the OS will not help me -like referring to all Windows flavours as mswin32 – I need to know explicitly and exactly if its Windows NT 4, where Win32::Perms->Recurs(1) will not work then folder/sub folder recursion is required, or if its a Windows2000 based then Win32::Perms will do the recursion for me. I have tried printing $^O and %ENV on my local Windows XP machine, the values MSWin32 and Windows_NT inaccurately were returned respectively

Thanking You

edited by ybiC: retitle from "Determining the exact type of OS of a remote server." for searchability


In reply to Determine exact OS of remote win32 server by blackadder

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.