Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Quote:
SECURITYMODE=SQL enables Mixed mode authentication and it is important to provide a strong SA password.
ADDLOCAL=ALL selects all the SQL Server Express components for installation.
DISABLENETWORKPROTOCOLS=0 to enable networking in the instance
qn is used to install silently


I have found these above parameters which are required while silently install SQL Express 2005 edition.

Can anyone guide me how do i utilize this code and install SQL Server 2005 express edition silently.
Posted
Updated 10-Jan-12 0:10am
v2

C#
private void button1_Click(object sender, EventArgs e)
        {
            Process p = new Process();
            ProcessStartInfo psi = new ProcessStartInfo();
            psi.FileName = Application.StartupPath.Trim() + @"\SqlServer2005 Express\SQLEXPR.EXE";
            //-q[n|b|r|f]   Sets user interface (UI) level:
            //n = no UI
            //b = basic UI (progress only, no prompts)
            //r = reduced UI (dialog at the end of installation)
            //f = full UI
            psi.Arguments = "/qb username=\"sa\" companyname=\"Rumtek\" addlocal=ALL  disablenetworkprotocols=\"0\" instancename=\"SQLExpress\" SECURITYMODE=\"SQL\" SAPWD=\"lock\"";
            p.StartInfo = psi;
            p.Start();
        }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900