srujan.palakurthi
Posts: 28
Joined: Tue Jun 25, 2019 8:48 am

Silent installation by passing parameters

Hi Advanced installer Team,

I wanted to implement silent installation for my project, can you please help with me.

below are the my project details and information.

my project has pre-requisite software, dialogues for user input values(and there is no default values for these and need to pass these as parameters.) and i am building this as Single EXE setup(resources inside), can we achieve silent installation for this?

Please suggest.
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Silent installation by passing parameters

Hello Srujan,

One thing to be kept in mind when it comes to .EXE files is the fact that they have dual UI's, the bootstrapper (.EXE) UI and the UI of the .MSI file. Therefore, in order to fully launch a .EXE file silently, a command line sample is as follows:

Code: Select all

setup.exe /exenoui /qn
In what regards the prerequisite, it is important to notice how their command line parameters work. For instance, if you go to "Prerequisites" page --> "Setup Files" tab --> "Install Command Lines" section, you will notice the following:

- Full UI --> these command lines will be executed when the main package (that launches the prerequisite) is launched with full UI

- Basic UI --> these command lines will be executed when the main package (that launches the prerequisite) is launched with basic UI

- Silent --> these command lines will be executed when the main package (that launches the prerequisite) is launched silently

Basically, as you can see, the command lines that are executed is dictated by the UI level of the main package. For example, if you want to execute certain command lines when the main package is run silently, you should add the command lines to the "Silent (no UI)" field.

Lastly, in what regards the parameters, they can be passed through the properties, as follows:

Code: Select all

setup.exe /exenoui /qn MY_PROPERTY="MyValue1" MY_PROPERTY_TWO="MyValue2"
Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
srujan.palakurthi
Posts: 28
Joined: Tue Jun 25, 2019 8:48 am

Re: Silent installation by passing parameters

Thanks Catalin for your response.

if i installed myproject.exe file it copy some project files into APPDIR folder and install some services, once installation completes it ask for reboot. it writes log in c:\ drive and update the project information in control panel.

when i tried same exe file with below command it is not writing log file, nothing copied to APPDIR directory and no services was installed but it ask for reboot and it was not updated control panel as well.

Code: Select all

myproject.exe /exenoui /qn

Could you pleas help me whit this.
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Silent installation by passing parameters

Hello Srujan,

In order to install a package silently, an elevated process is required.

Please make sure that you run cmd with administrator rights (right click --> "Run as administrator") and then re-try this scenario.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
srujan.palakurthi
Posts: 28
Joined: Tue Jun 25, 2019 8:48 am

Re: Silent installation by passing parameters

Hi Catalin,

Actually I have tried with admin command prompt ( opened it run as admin) .

Is there anyway to know what it is doing? Any log?

Anything am I missing? Coula you please suggest.

Thanks,
Srujan.
srujan.palakurthi
Posts: 28
Joined: Tue Jun 25, 2019 8:48 am

Re: Silent installation by passing parameters

Any update on this and i have another question.
srujan.palakurthi
Posts: 28
Joined: Tue Jun 25, 2019 8:48 am

Re: Silent installation by passing parameters

Any update on this and i have another question.

usually my project installation does take 3-5 min.. but with silent installation how can we know is installation done and successful?

Thanks,
Srujan.
srujan.palakurthi
Posts: 28
Joined: Tue Jun 25, 2019 8:48 am

Re: Silent installation by passing parameters

Hi @catalin,

Could you please help me with my questions.

how can i make sure silent installation done successful? usually installation with UI takes 3-5 minutes.

is there any option to enable logging in command prompt?

Please help me with these.
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Silent installation by passing parameters

Hello Srujan,

This is quite strange, indeed.

You previously mentioned that your setup needs some parameters which you provide through the UI. When deploying the setup silently, did you also pass the parameters?

You can pass the parameters as it follows:

Code: Select all

setup.exe /exenoui /qn YOUR_PROPERTY_1="value1" YOUR_PROPERTY_2="value2"
Also, in order for me to further investigate this, please forward me the following resources by e-mail at support at advancedinstaller dot com:

- a copy of your .AIP file

- a download link for the .EXE file resulted after building the above mentioned .AIP file

In what regards the logging, you can enable that using a command line as it follows:

Code: Select all

setup.exe /exenoui /qn /L*V "<path_to_log>\logName.txt"
Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
srujan.palakurthi
Posts: 28
Joined: Tue Jun 25, 2019 8:48 am

Re: Silent installation by passing parameters

Thanks Catalin for your response.

Actually i have passed parameters as you suggested, but here the issue was different i.e. my Project has one CustomAction and that was configured to execute at wizard dialog stage and that i have moved to execution level.

Based on this customaction installation will be performed. when i ran silently it was not triggered and installation was not performed.

now i am stuck at how to make sure the installation completed successful with silent installation.

can you please help me with this.
srujan.palakurthi
Posts: 28
Joined: Tue Jun 25, 2019 8:48 am

Re: Silent installation by passing parameters

Any update on below.
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Silent installation by passing parameters

Hello Srujan,

By default, two installation processes can not happen at the same time.

If you want to install another package during the "Install Execution" stage, please add your custom action at the end of the installation (e.g. after "Finish Execution" action group) and uncheck the following options:

- "Wait for custom action to finish before proceeding"

- "Fail installation if custom action returns an error"

from under the "Execution Options" section.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
srujan.palakurthi
Posts: 28
Joined: Tue Jun 25, 2019 8:48 am

Re: Silent installation by passing parameters

Thanks Catalin for your response.

can you please suggest on this:

now i am stuck at how to make sure the installation completed successful when i install silently.

Please help on this ASAP.
srujan.palakurthi
Posts: 28
Joined: Tue Jun 25, 2019 8:48 am

Re: Silent installation by passing parameters

Advanced Installer Team,

Can you please update on this.
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Silent installation by passing parameters

Hello Srujan,
now i am stuck at how to make sure the installation completed successful when i install silently.
I am not quite sure I understand what you mean here. Could you please elaborate?

If I understand correctly, you want to check the installation status (please correct me if I'm wrong). To do so, there are multiple ways:

- you can check Control Panel and see if your application was installed

- you can check Event Viewer to see if your application was installed

- you can create an installation log and check it

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”