Hola lizfranco.
Yo uso Win2000 y la propiedad
navigator.userAgent identifica mi S.O. como Windows NT 5.0 por lo que si modificamos el script de la siguiente manera incluirá a Win2000:
Código PHP:
<html>
<head>
<script language="JavaScript">
function checkOS(){
var sAgnt = navigator.userAgent;
var OpSys = 'other';
var bWin = (sAgnt.indexOf('Win') != -1);
if (bWin){
OpSys = "Windows NT or Windows 3.1 or ME or XP";
if (sAgnt.indexOf('98') != -1) OpSys = "Windows 98";
if (sAgnt.indexOf('95') != -1) OpSys = "Windows 95";
if (sAgnt.indexOf('NT 5.0') != -1) OpSys = "Windows 2000";
} else {
if (sAgnt.indexOf('IRIX') != -1) OpSys = "Irix";
if (sAgnt.indexOf('Mac') != -1) OpSys = "Macintosh";
if (navigator.appName=="WebTV Internet Terminal") OpSys="WebTV";
}
return OpSys;
}
function alertOS(){
alert(checkOS());
}
</script>
</head>
<body>
<form name="frm">
<input type="button" name="os" value="Probar función" onclick="alertOS()">
</form>
</body>
</html>
Sería bueno sin embargo que probaras poner en un alert que te responde user.agent cuando lo corres en otro sistema operativo, de ese modo podríamos tener bases para ampliar la función.
Saludos.