468,301 Members | 1,487 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,301 developers. It's quick & easy.

Sql Express installed using Package deployment does not provide change 'sa' password

I want to deploy my application which requires .Net framework, SQL Express as prerequisites. So i created a setup project in VS2008 and selected .Net framework and SQL Server 2005 Express.
Now while installing my application at client's site, it first installs .Net framework followed by SQL Express 2005. But while installing SQL Express it does not prompt for the user to set the password for 'sa' user. There is no dialog displayed for user selection. It installs in windows authentication mode. Is there a way to set the SQL Server autentication mode. Please note that i dont want to install SQL Server Management studio.
Your help is appreciated
Jan 25 '10 #1
1 2473

Easiest way is to add the following into the setup.ini file

under options


You can also set the SA Password

SAPWD= somemeaninglessstring

You can also set the Server Login Mode through the registry after install through the registry

For Default install with no instance name set

USE [master]
EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'LoginMode', REG_DWORD, 2

If there is an instance name set

USE [master]
EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\Microsoft SQL Server\Instance Name\MSSQLServer', N'LoginMode', REG_DWORD, 2

Hope this helps


Jan 26 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

10 posts views Thread by =?Utf-8?B?UHVuaXQgS2F1cg==?= | last post: by
8 posts views Thread by jch | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.