determine OS is windows 2003 or 2008
-
Dear All, (C# VS 2005) I need a function to determine If OS used is windows 2003 or 2008 ??
Yes. CreatiVity withOuT limiTs
System.OperatingSystem osInfo =System.Environment.OSVersion; I believe there's a name property, but also, you should be able to find out what the major and minor versions for both those OSes are ( although I confess that googling didn't get me those numbers in a hurry, but older samples that only go to vista )
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
System.OperatingSystem osInfo =System.Environment.OSVersion; I believe there's a name property, but also, you should be able to find out what the major and minor versions for both those OSes are ( although I confess that googling didn't get me those numbers in a hurry, but older samples that only go to vista )
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
Hello I have read this exmple http://www.codeproject.com/KB/system/osversion_producttype.aspx[^] and read GetOSName() else if(osInfo.Version.Minor == 2) { osName = "Windows Server 2003"; } I dont know if u put else if(osInfo.Version.Minor == 3) { osName = "Windows Server 2008"; } is this right ???????????????????????????
Yes. CreatiVity withOuT limiTs
-
Hello I have read this exmple http://www.codeproject.com/KB/system/osversion_producttype.aspx[^] and read GetOSName() else if(osInfo.Version.Minor == 2) { osName = "Windows Server 2003"; } I dont know if u put else if(osInfo.Version.Minor == 3) { osName = "Windows Server 2008"; } is this right ???????????????????????????
Yes. CreatiVity withOuT limiTs