How to run Setup.msi silently without dialogs - Advanced Installer Community
CristianYNK
Posts: 5
Joined: Fri Feb 17, 2017 6:56 pm

How to run Setup.msi silently without dialogs

Good afternoon,

I want to run an only file,setup.msi, without user interface dialogs and silently. Nothing more, nothing less. I'm confused on how to do this via Advanced Installer Enterprise.

I proceeded as follows:

1) Created a Custom Action (launch file) that specifies:

Files to launch: C:\Test\Setup.msi
Command line: msiexec.exe /i "C:\Test\Setup.msi" /qn /l*v "C:\Test\Setup.log"

Where do I "put" this Custom Action in order for it to run? (remember I do not wish for there to be any dialog present)

2) Regarding the "Files and Folders and Shortcuts" section, should I modify anything here? If I dont add anything, my built-installer is only 404kb, but Im confused on where to "add it" since I do not want to copy it anywhere specifically on the target computer, I just want for it to run with the aforementioned parameters.


Thanks in advance!
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to run Setup.msi silently without dialogs

Hi,

In order to achieve what you want, you need to add your package as a prerequisite as described in the "Add Prerequisites" tutorial. The command line can be written in the "Install Command Lines" fields from the "Setup Files" tab, but the "msiexec.exe /i C:\Test\Setup.msi" arguments should not be written anymore.

If you do not want to install other files with your MSI package, you do not need to add anything in the "Files and Folders" page.

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
CristianYNK
Posts: 5
Joined: Fri Feb 17, 2017 6:56 pm

Re: How to run Setup.msi silently without dialogs

Eusebiu wrote:Hi,

In order to achieve what you want, you need to add your package as a prerequisite as described in the "[url=http://www.advancedinstaller.com/user-g ... requisites]Add Prerequisites[/url" tutorial. The command line can be written in the "Install Command Lines" fields from the "Setup Files" tab, but the "msiexec.exe /i C:\Test\Setup.msi" arguments should not be written anymore.

If you do not want to install other files with your MSI package, you do not need to add anything in the "Files and Folders" page.

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Hi Eusebiu,

Thanks for your reply.

I went ahead and did as you specified:

* Created a New Project.
* Went to prerequisites > Packages > New Package Prerequisite.
* Selected Setup.msi file path.
* Built my exe in order to test it.

Once again, this happened:

* Upon double clicking my compiled exe, an installation dialog appeared. I need for NO Advanced Installer dialogs to appear.
* It was odd that the original installer, Setup.msi, weighs 20MB, but the compiled Advanced Installer EXE file only 707kb, so that already indicates that something went wrong.
* I executed it the 707kb EXE file anyways, and a dialog appeared saying that it should be run from the "bootstrapper".

So still, I cannot seem to create an Advanced Installer executable file that ONLY runs a Setup.msi file silently.

Any help is appreciated.

Thanks a lot,
Cristian
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to run Setup.msi silently without dialogs

Hi Cristian,
* Upon double clicking my compiled exe, an installation dialog appeared. I need for NO Advanced Installer dialogs to appear.
Can you follow the steps below and see if this works as you need:
- go in the "Install Parameters" page and check the "Run as administrator" option
- in the "Product Details" page uncheck the "Register product with Windows Installer" option
- add your MSI package as a "pre-install" prerequisite then add your command line in the "Silent (no UI)" field from the "Setup Files" tab
- go in the "Builds" page and check the "Single EXE setup (resources inside)" option
- in the "MSI command line" field write the "/qn" command
- go in the "Dialogs" page, "Pre-install UI" section and select the "Silent install (no UI)" option from the "UI level" combobox
- build and run the project
* It was odd that the original installer, Setup.msi, weighs 20MB, but the compiled Advanced Installer EXE file only 707kb, so that already indicates that something went wrong.
This happens if the "EXE setup with resources next to it" package type was selected in the "Builds" page. In this case, an EXE package with resources next to it (MSI, CAB, prerequisites) is created.
* I executed it the 707kb EXE file anyways, and a dialog appeared saying that it should be run from the "bootstrapper".
When an EXE package is created with resources next to it, only the EXE file can be launched for installation. If the MSI package is launched, that message is displayed.

Just let me know if you have other questions.

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

Return to “Common Problems”