Gerry
Posts: 3
Joined: Tue Oct 02, 2012 6:10 am

Small Business Server / Install Conditions / Prerequisites

Hi, I would like to detect whether Windows is Small Business Server or a Domain Controller, and install a prerequisite with a different command line based these conditions.

Specifically, I'm installing SQL Server 2008 R2 Express as a prerequisite. As part of the command line, I have
/SQLSVCACCOUNT="NT AUTHORITY\Network Service"
which works well in most cases but will not work on SBS or a Domain Controller, in which case I want to specify a different service account.

What would be the best way for me to do this in Advanced Installer?
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Small Business Server / Install Conditions / Prerequisit

Hello,

We don't have predefined support to detect those versions of operating systems but you can create your own custom action.
In order to detect Domain Controller context you can create your custom action which will search for computer role and will set a property (e.g. CUSTOM_COMAND) accordingly. You can take a look on "How can I tell if my program is running on a Domain Controller?" article which could be useful for you.

In order to detect the Operating Systems Version you can use a custom action that will set a property (e.g. CUSTOM_COMAND) accordingly. You can take a look on getting the system version MSDN article describing probing the operating system version, including whether the system is a small business product (PRODUCT_SMALLBUSINESS_SERVER enumeration).

You can go in the “Install Parameters” page and create a new property like this:
Name field: CUSTOM_COMAND
Value field: /SQLSVCACCOUNT="NT AUTHORITY\Network Service"

Now, you can go in the “Prerequisites” page, select your prerequisite(e.g. SQL Server 2008 R2 Express ) and in the “Setup Files” tab , in the “Install Command Lines” you can use a reference to your previous property( e.g. [CUSTOM_COMAND] ).
Please note that This field supports Formatted type only if the prerequisite is feature-based.

If your prerequisite is a “pre-install” one you can duplicate it (use a copy-paste operation) in the "Prerequisites" page. We will use the copy of the prerequisite package in case when the target OS is a SBS or DC and in the “Install Command Lines” use the appropriate command lines. You should also add a new “Search done by a custom executable” install condition using a custom .exe that will detect if the OS is SBS or DC and will return accordingly a return code.

The original prerequisite package will be used in case when the target OS is NOT a SBS or DC and in the “Install Command Lines” use the appropriate command lines. You should also add a new “Search done by a custom executable” install condition using a custom .exe that will detect if the OS is NOT a SBS or DC and will return accordingly a return code.

If you have any more questions please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”