By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,843 Members | 2,324 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,843 IT Pros & Developers. It's quick & easy.

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

P: 38
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
Thanks
Jan 25 '10 #1
Share this Question
Share on Google+
1 Reply


P: 53
Hi,

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

under options

SECURITYMODE=SQL

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]
GO
EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'LoginMode', REG_DWORD, 2
GO

If there is an instance name set

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

Hope this helps

Cheers

Leon
Jan 26 '10 #2

Post your reply

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