cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
DFett9
Level 3

Call "SQL_Server_Setup.exe" from our MSI setup

Jump to solution

Hi all,

We use a basic MSI setup and have created a setup.exe file so far
This setup immediately demanded administrator rights when it was started (manifest).

We now want/must switch to an MSI setup. This also temporarily receives administrator rights during the installation
But we cannot start the SQL Server setup with administrator rights. So the installation of the SQL server always fails.

We also use Installscript Custom Actions. We also have problems there now that actions that we carry out via script fail due to missing permissions.

Does anyone know how to get admin rights for our own CA admin in an MSI setup (and still have access to all properties)?

Greetings Dietmar

Labels (1)
0 Kudos
(1) Solution
shunt
Revenera Moderator Revenera Moderator
Revenera Moderator

Running a custom action to launch an install of SQL Server in the execute sequence is not possible.

SQL Server is a Windows Installer based installer, therefore you would have 2 installers attempting to concurrently use the Windows installer Engine in the execute sequence at the same time
This is not supported as Windows Installer only allows one InstallExecuteSequence to run at a time.

You will need to run Windows Installer installations in sequence using a bootstrapper, such as a prerequisite.

View solution in original post

0 Kudos

(7) Replies
shunt
Revenera Moderator Revenera Moderator
Revenera Moderator

If I understand this - you want to use a .msi rather than a setup.exe - but in doing so the installer is no longer able to start an SQL Server setup.

I think the issue here would be that its not possible to have an .msi start an SQL Server setup (Which is itself a Windows Installer based package) as this would mean 2 .msi files running in the execute sequence concurrently which Microsoft don't support.
When using a setup.exe for your installer, the setup will first launch SQL as a prerequisite and after it completes it will then start the main .msi package avoiding this limitation.

0 Kudos

Hi,
Currently we are using OurSetup.exe (with a manifest that requests admin rights). This setup starts (if the customer chooses it) the SQL Server setup: SQLServerSetup.EXE.

Now there is a requirement that we change our setup to MSI. The MSI setup only gains administrator rights late in the installation. If we now call the SQLServerSetup.EXE (call via InstallScript in a CA) it also starts. It then breaks off because the SQL Server setup requires administrator rights for the installation.
Is there a way that I can start/run my own CA with administrator rights. 

0 Kudos
shunt
Revenera Moderator Revenera Moderator
Revenera Moderator

There is an option within your project under "General Information" > Require Administrative Privileges = Yes
This will force the .msi to run in admin mode, but only during the execute sequence.

Where in your installation is you CA being launched?

If you require the .msi to run as admin before the execute sequence, then you will need an external mechanism to start the .msi file with those permissions.
The 2 options would be a setup.exe (which you don't want to use), or alternatively you can manually start the .msi from a command prompt with admin permissions.

As a test follow these steps:
- In the bottom left search bar type "cmd"
- Right click "Command Prompt" and select "Run as administrator"
- Use the Admin Command prompt to run your .msi file

This will run the .msi with full admin permissions - does this allow your CA to install SQL correctly?

0 Kudos

When i run my CA (see Screenshot) in the execute Sequenz i can start a cmd-Line Box with Admin rights. But when i can't get acces to a network drive.  But my Setup can copy File to the network Drive. i can't also read the propertys.

0 Kudos

Screenshot: Screenshot 2022-09-16 133145.png

0 Kudos
shunt
Revenera Moderator Revenera Moderator
Revenera Moderator

Running a custom action to launch an install of SQL Server in the execute sequence is not possible.

SQL Server is a Windows Installer based installer, therefore you would have 2 installers attempting to concurrently use the Windows installer Engine in the execute sequence at the same time
This is not supported as Windows Installer only allows one InstallExecuteSequence to run at a time.

You will need to run Windows Installer installations in sequence using a bootstrapper, such as a prerequisite.

0 Kudos

okay thanks. Then we have to think of something else

0 Kudos