Thank you for your response. Can you please clarify item 1? You state that
name. The question is only how to automate the install to handle this.
"Steven Cheng[MSFT]" <stcheng@online.microsoft.com> wrote in message
news:hMqgXXGOHHA.2304@TK2MSFTNGHUB02.phx.gbl...
> Hello Matt,
>
> From your description, you're developing a setup program for your
> application, you've included the SQL Express as pre-requisites, currently
> you're wondering how to programmatically do some initial configuration on
> the sql express instance during the setup process, correct?
>
> Based on my understanding and research, here are some suggestion to the
> three questions you mentioned:
>
> 1: Install to a specific instance.
> =================================
> I'm afraid this is limited by the SQL Express edition because SQL Express
> is always forced to be installed as a fixed named instance
> (machine\SQLExpress). We can not customize this instance's name.
>
> 2: Enable TCP/IP & 3: Set security mode to SQL
> =================================
> There are a couple of ways to for programmatic configuration of SQL Server
> 2005 instance:
>
> **Write a VBscript/Jscript/VB6/perl (any late bound language) script that
> changes the security mode of SQL Server using the WMI Provider.
>
> ** Write a VBscript/Jscript/VB6/perl (any late bound language) script
> that
> changes the security mode of SQL Server using SMO COM Friendly Wrappers
> Write a C#/VB.NET/[add your favorite .NET Language] program using SMO (it
> would in fact use the WMI Provider)
>
> **Write a C program that uses COM to interoperate with DMO9, WMI, or SMO
> objects that are registered to COM. Note that the SMO COM wrappers only
> support late bound (you can write your own if needed)
>
> I'd prefer the use SMO through .net code(VBNET or C#) since it is quite
> convenient to use. And After you installed SQL Express, .net framework 2.0
> runtime should be installed also(it is required for SQL SERVER 2005).
> Therefore, your custom .net code in setup project(such as custom action)
> can work corretly. For example, the following C# code help set
> SQLExpress's
> authentication mode to Inegrated wnidows.
>
> ================
> Server express = new Server("localhost\\sqlexpress");
> MessageBox.Show("current login mode: " +
> express.Settings.LoginMode);
> express.Settings.LoginMode = ServerLoginMode.Integrated;
> express.Alter();
> ==================
>
> Here are some other web articles introducing configure SQL server
> protocols
> through WMI or SMO managed api.
>
>
http://blogs.msdn.com/sql_protocols/archive/2005/10/19/482840.aspx >
>
http://blogs.msdn.com/mwories/pages/change-server-protocol.aspx >
> #some other samples on using SQL 2005 SMO:
>
http://blogs.msdn.com/mwories/archive/tags/SMO+Samples/default.aspx >
> Still another possible way is directly change the registery value. e.g.
>
> ===========
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL
> Server\MSSQL.1\MSSQLServer\SuperSocketNetLib\Tcp\@Enabled
> ===========
>
> However, this is not quite recommended and I'd suggest you consider the
> former means if possible.
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
>
> ==================================================
>
> Get notification to my posts through email? Please refer to
>
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif > ications.
>
>
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
>
http://msdn.microsoft.com/subscriptions/support/default.aspx. >
> ==================================================
>
>
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>
>
>
>