procedure TMSDE2005Fm.ButtonInstallClick(Sender: TObject);
Var
txt: TextFile;
aFileName, s: String;
begin
aFileName := GetTempDir + '\PROD_Name.bat';
AssignFile(txt, aFileName);
ReWrite(txt);
s := GetSetupString;
WriteLn(txt, s);
CloseFile(txt);
MessageDlg('Setup will now begin for SQL Server 2005 Express.', mtInformation, [mbOk], 0);
ShellExecute(0,'open',PChar(aFileName),nil,nil,SW_SHOW);
ButtonCancel.Caption := '&Finish';
end;
function TMSDE2005Fm.GetSetupString: String;
begin
Result := '"' + Trim(wwDBEditSetup.Text) + '" /qb';
Result := Result + ' ADDLOCAL=SQL_Engine,SQL_Data_Files,SQL_Replication,Client_Components,Connectivity,SQL_SSMSEE';
Result := Result + ' INSTANCENAME=' + Trim(wwDBEditInstanceName.Text);
Result := Result + ' SAVESYSDB=1';
Result := Result + ' SQLBROWSERAUTOSTART=1';
Result := Result + ' SQLAUTOSTART=1';
Result := Result + ' AGTAUTOSTART=1';
Result := Result + ' SECURITYMODE=SQL';
Result := Result + ' SAPWD=' + Trim(wwDBEditPassword.Text);
Result := Result + ' DISABLENETWORKPROTOCOLS=0';
Result := Result + ' ERRORREPORTING=0';
Result := Result + ' SQMREPORTING=0';
Result := Result + ' ADDUSERASADMIN=1';
Result := Result + ' INSTALLSQLDIR="' + Trim(IncludeTrailingPathDelimiter(wwDBEditTargetDir.Text)) + '"';
end;
This article has been dead for over six months. Start a new discussion instead.