How to determine if OS is Windows Server 2008 R2

Got a problem you cannot solve? Try here.
CFConner
Posts: 85
Joined: Wed Jan 21, 2009 4:14 pm
Location: Syracuse, NY

How to determine if OS is Windows Server 2008 R2

Postby CFConner » Thu Jan 14, 2010 3:29 pm

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

CFConner
Posts: 85
Joined: Wed Jan 21, 2009 4:14 pm
Location: Syracuse, NY

Quick test...

Postby CFConner » Thu Jan 14, 2010 3:56 pm

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

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Thu Jan 14, 2010 5:15 pm

I'd check for SEVEN, and then for server capability using Get System Setting Windows with Server Features into...
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

Tiago
Posts: 129
Joined: Thu Jun 18, 2009 9:08 am

Postby Tiago » Mon Mar 08, 2010 4:43 pm

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.
Tiago Rocha
Product Technology
www.ppi-multitask.com.br

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Mon Mar 08, 2010 6:36 pm

Tiago, please do not post the same question to three different topics - this is dangerously close to spamming and can get you banned.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

Tiago
Posts: 129
Joined: Thu Jun 18, 2009 9:08 am

Postby Tiago » Tue Mar 09, 2010 7:34 am

Sorry for that, Michael and thanks for your answer in the other topic (http://www.installaware.com/forums/viewtopic.php?p=19484#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!
Tiago Rocha

Product Technology

www.ppi-multitask.com.br


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 68 guests