{"id":18,"date":"2008-03-04T12:21:30","date_gmt":"2008-03-04T20:21:30","guid":{"rendered":"http:\/\/www.installaware.com\/blog\/?p=18"},"modified":"2008-03-24T07:41:38","modified_gmt":"2008-03-24T15:41:38","slug":"how-to-detect-windows-server-2008","status":"publish","type":"post","link":"https:\/\/www.installaware.com\/blog\/?p=18","title":{"rendered":"How to detect Windows Server 2008"},"content":{"rendered":"<p>Hi. Many of you have asked if InstallAware supports detecting the newly released <strong>Windows Server 2008<\/strong>. It&#8217;s very easy by using the code below:<\/p>\n<p>Set Variable SERVER2008 to FALSE<br \/>\nGet System Setting Service Pack 1 into SP1<br \/>\nGet System Setting Windows Vista into VISTA<br \/>\nGet System Setting Windows with Server Features into SERVER<br \/>\nif Variable VISTA Equals TRUE<br \/>\n\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 if Variable SP1 Equals TRUE<br \/>\n\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 if Variable SERVER Equals TRUE<br \/>\n\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 Set Variable SERVER2008 to TRUE<br \/>\n\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 end<br \/>\n\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 end<br \/>\nend<\/p>\n<p>After this code runs, if the variable SERVER2008 is TRUE, then OS hosting your installer is Windows Server 2008. You can add this piece of code somewhere inside your main setup script, or inject it as a requirement inside the <strong>&#8220;Check Application Requirements&#8221; code folding region<\/strong> to prevent your installation from running at all if the target OS is not Windows Server 2008.<\/p>\n<p>You can also check for <strong>Windows Vista with Service Pack 1<\/strong> using the same script but by removing the &#8220;<em>if Variable SERVER Equals TRUE<\/em>&#8221; evaluation.<\/p>\n<p>You can download the script from <a target=\"_blank\" href=\"http:\/\/support.installaware.com\/index.php?_m=downloads&amp;_a=viewdownload&amp;downloaditemid=17\">here<\/a>.<\/p>\n<p>Thank you,<\/p>\n<p>Panagiotis Kefalidis<br \/>\nSoftware Design Team Lead<br \/>\nInstall<span style=\"font-weight: bold\">Aware<\/span> Software Corporation<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi. Many of you have asked if InstallAware supports detecting the newly released Windows Server 2008. It&#8217;s very easy by using the code below: Set Variable SERVER2008 to FALSE Get System Setting Service Pack 1 into SP1 Get System Setting Windows Vista into VISTA Get System Setting Windows with Server Features into SERVER if Variable &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.installaware.com\/blog\/?p=18\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to detect Windows Server 2008&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,1],"tags":[],"class_list":["post-18","post","type-post","status-publish","format-standard","hentry","category-msi-code-scripting","category-news"],"_links":{"self":[{"href":"https:\/\/www.installaware.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/18","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.installaware.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.installaware.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.installaware.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.installaware.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=18"}],"version-history":[{"count":0,"href":"https:\/\/www.installaware.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/18\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.installaware.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=18"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.installaware.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=18"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.installaware.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}