aho
Posts: 58
Joined: Thu Jul 21, 2016 4:38 pm

Change SQL Instance Namen and sa password

Hi,
my setup wizard installs SQL Server. This works so far.
What I want to do now is, to let the user change the Instance Name of the SQL database and the Password for the sa user.

How can this be done with Advanced Installer (Professional Edition)?
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Change SQL Instance Namen and sa password

Hi,

You can set the Instance Name of the SQL Database and a password for the 'sa' user in the command line when you install SQL Server. All the supported command lines are detailed in the "Install SQL Server from the Command Prompt" article.

In Advanced Installer you can write them in the "Install Command Lines" fields from the "Setup Files" tab of the prerequisite.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
aho
Posts: 58
Joined: Thu Jul 21, 2016 4:38 pm

Re: Change SQL Instance Namen and sa password

Hi,
this is how it is done now. But what I want to do now, is to let the customer choose a password and instance name within the setup wizard.

Is there a way to do this?
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Change SQL Instance Namen and sa password

Hi,

In order to let the user choose the instance name and a password you can install SQL Server as a feature-based prerequisites.

In the command line fields you can assign some custom properties to the instance name and the password (e.g. /INSTANCENAME=[INST_PROP]). Then, you can add some "Edit box" controls on a new dialog, in the "Dialogs" page and assign those properties to those edit boxes.

When the user will write some values in those boxes, their related properties will be set to those values which will be sent to the SQL Server command line.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
aho
Posts: 58
Joined: Thu Jul 21, 2016 4:38 pm

Re: Change SQL Instance Namen and sa password

Eusebiu wrote:Then, you can add some "Edit box" controls on a new dialog, in the "Dialogs" page and assign those properties to those edit boxes.
This sounds good, but is this possible with Professional edition?
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Change SQL Instance Namen and sa password

Hi,

I'm afraid that the "Dialogs Editor" feature is available only in an " Enterprise" or higher project type.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
aho
Posts: 58
Joined: Thu Jul 21, 2016 4:38 pm

Re: Change SQL Instance Namen and sa password

OK, since only advanced users need to change the instance name and password - it would be OK, to start my setup wizard with command line arguments. Something like:

Code: Select all

setup.exe /instancename=myName /pw=myPassword
:?: Is there a way to get those arguments into the install command line fo sql setup?
:?: Or is there maybe another workaround?

Thanks so far!
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Change SQL Instance Namen and sa password

Hi,

I'm afraid that the command line sent to the main package, cannot be passed to the prerequisites command line.

As a workaround, you can install SQL Server with a configuration file, so the user can modify the values in that file.

For this, you need to add SQL Server as a pre-install prerequisite and create your package with resources next to it.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”