2000 pro or server
Is there a way to tell the difference between windows server and professional? I can't seem to figure out a way that a program will only install on a server.
Thanks for your assistance.
Archive: 2000 pro or server
2000 pro or server
Is there a way to tell the difference between windows server and professional? I can't seem to figure out a way that a program will only install on a server.
Thanks for your assistance.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion contains a string called "ProductName" which contains the value "Windows 2000", on the w2k professional build; However, this string does not exist on w2k Server.
I only have one 2k Server to check, can anyone else confirm this? It is in the same location which we obtain the different windows versions from.
If the above is always true, then you can just check for this strings existence.
I wish it was that easy. The productName key shows up on server and pro.
It is easy! I spent 15 minutes and found the answer!
Here you go:
Look in the registry here "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions"
Get the value for "ProductType"
Compare the values to the following table:
If ProductType is, "WinNT", then this is "Professional"
If ProductType is, "LanManNT", then this is "Server"
If ProductType is, "ServerNT", then this is "Advanced Server"
If ProductType is, "Unknown", then this is "Data Centre"
Unknown- Anyone have Data Centre?
Someone should update the GetWindowsVersion, to supply this info. ;)
Cheers,
ZIMSMS
Ahnnnnn... This is not so accurate either. I have Windows XP Home Edition and it returns "WinNT", so that means "Home" and "Professional" versions return this value. We should find ways to differenciate from both now.
Originally posted by deguixupdated version @ the guys website: http://www.naughter.com/dtwinver.html (v1.68)
Ahnnnnn... This is not so accurate either. I have Windows XP Home Edition and it returns "WinNT", so that means "Home" and "Professional" versions return this value. We should find ways to differenciate from both now.
Wow, a great program. A .dll version for NSIS of this program would be great!
The post I made above will work, since the current GetWindows Version, determines if it's XP, 2000, etc. You would place the above in the is2000 area.
Anyways, as for the link Anders listed, that would make a nice plugin.
Got a little side tracked on this project... but, thank you this was exactly what I was looking for.
regards