Page 1 of 1
How to determine if OS is Windows Server 2008 R2
Posted: Thu Jan 14, 2010 3:29 pm
by CFConner
I've done a search, but cannot find if anyone has done a script to determine if the OS is Windows Server 2008 R2.
I need to exclude some runtimes to get my installer working properly in Windows Server 2008 R2. Any help would be appreciated.
=-Chris
Quick test...
Posted: Thu Jan 14, 2010 3:56 pm
by CFConner
Ok, as a quick test, I did the following in my main script:
Set Variable OSVersionR2 to
Get Exact OS Level into OSVersionR2
Write into Text File C:\\info.txt from Value $OSVersionR2$ (at end of file)
It reports back to me SEVEN (which is what I expect)
Then I tried this:
Get System Setting Windows 2008 into OSVersionR2
Write into Text File C:\\info.txt from value $OSVersionR2$ (at end of file)
The info.txt file reports this:
SEVEN
FALSE
Ok, So I know it is not Windows 7 CLIENT (as opposed to Windows 7 Server (which is What Windows 2008 R2 is)
I change the above to do this:
Get System Setting Windows 7 into OSVersionR2
Write into Text File C:\\info.txt from value $OSVersionR2$ (at end of file)
Now I get:
SEVEN
TRUE
How do I tell the difference between Windows 7 CLIENT and Windows 2008 R2 SERVER?
The GetSystemSettings does not list R2 as an OS to select yet

.
=-Chris
Posted: Thu Jan 14, 2010 5:15 pm
by MichaelNesmith
I'd check for SEVEN, and then for server capability using Get System Setting Windows with Server Features into...
Posted: Mon Mar 08, 2010 4:43 pm
by Tiago
Hmmm... great tip.
What if I want to detect if I'm running under Windows XP Home or Windows XP Professional?
Thank you very much.
Posted: Mon Mar 08, 2010 6:36 pm
by MichaelNesmith
Tiago, please do not post the same question to three different topics - this is dangerously close to spamming and can get you banned.
Posted: Tue Mar 09, 2010 7:34 am
by Tiago
Sorry for that, Michael and thanks for your answer in the other topic (
http://www.installaware.com/forums/view ... 9484#19484). Perhaps it may provide a clue or insight to people who are trying to detect Windows Server 2008 R2 and other Windows sub-versions, too?
Thank you so very much!