The other day I was preparing an ini file for an unattended installation of SQL Server 2008 R2. The easiest way to do that is using the setup wizard until you get to the “Ready to Install” page. This article shows you how to do it.
The problem I had with the ConfigurationFile.ini that the wizard created for me is that it included both these options:
I set the first option to BUILTIN\Administrators to give local administrators the correct permissions and I set the second option to false. But when I first ran the install unattended, SQL Server was installed properly, but the sys admin group was getting access to SQL. This TechNet article states that the SQLSYSADMINACCOUNTS is a required setting, because I wasn’t installing the Express edition. It turns out you have to remove the ADDCURRENTUSERASSQLADMIN option from the generated ini file. This is a setting for Express editions and cannot be used when SQLSYSADMINACCOUNTS is used. Took me some time to find the solution in this CodeProject article.