PDA

View Full Version : SUF thinks 2003/64 is actually XP?????


jassing
03-07-2007, 11:55 AM
SUF's functions are not returning valid results for a 2003 64bit server.


Using this code:
tinfo = System.GetOSVersionInfo();
cinfo = "";

cinfo = tinfo.MajorVersion .. "\r\n" ..
tinfo.MinorVersion .. "\r\n" ..
System.GetOSName();

if System.Is64BitOS() then
cinfo = "64\r\n"..cinfo;
else
cinfo = "32\r\n"..cinfo;
end

Dialog.Message("test",cinfo);
Application.Exit(0);

Produced the attached dialog.
In a nut shell; it thinks it's XP, not 2003
Major issue for me.

Anyone have a reliable way to detect the os name/version?

Eagle
03-08-2007, 08:02 AM
for starters, have a look into returning:

tinfo.ProductType ( check the syntax :) )

1= client, 2= domain controller, 3 = Server

if is a 64bit os then....
if returns 1 is XP
if returns 3 is 2K3

consult the help for all type's of returns and table values

hth

jassing
03-08-2007, 09:05 AM
for starters, have a look into returning:

tinfo.ProductType ( check the syntax :) ) if returns 3 is 2K3



I mean no offense, I appreciate your time -- but how do you get from "is a server" to "it's windows 2003 server"?????

The help just says 3 = server NOT 3 = winodws 2003 if it's a 64 bit os. That's sortof a leap and a jump...

The help also doesn't say to ignore hte value from GetOsName() (which should return "Windows Server 2003") if ti's a 64 bit os....

What happens when ms releases a new server level os that is not 2003 and is a 64 bit?

Adam
03-08-2007, 12:50 PM
Logged. REF: 14993

Adam Kapilik