We already have a spver: function getSPver() { position="wmi.js"; whatfunc="getSPver()"; if (szServicePackCache==NOT_FOUND) // this function is called often - get it once and cache the result { try { objWMIService=GetObject("winmgmts:\\\\" + "." + "\\root\\CIMV2"); colItems=objWMIService.ExecQuery("SELECT * FROM Win32_OperatingSystem", "WQL", wbemFlagReturnImmediately | wbemFlagForwardOnly); enumItems=new Enumerator(colItems); objItem=enumItems.item(); szServicePackCache=objItem.ServicePackMajorVersion; } catch(ex) { var sp=""; try { sp=WshShell.RegRead("HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\CSDVersion"); } catch(ex) { ; } if (sp != "") { szServicePackCache=sp.substr(sp.length-1,1); } } } return szServicePackCache; } As for the "5.1/6.0/6.1/6.2" IF You and francesco can just add it to the existing code fine. I am not going to tell the thousands and thousands out there that they have to change all of their osver to the 5.1/6.0/6.1/6.2. Only 5% or so of them will listen.