coroberti
Posts: 18
Joined: Sun Jan 19, 2020 4:11 pm

Silent Installation Fails

Hi,
I'm using professional project as a trial with a goal to create a silent installation.

Installation with UI works properly, but trying silent run in cmd running as Admin fails.

I've already tried to run the installation on Win-7 and on Win-10 with the same result (do I need a windows server?).
Selecting checkbox "Limit to basic user interface" on Installation Options created installation
running without UI properly when clicking it. However, it end with the same error when trying to
run it silently from command prompt.

The command line used is:
msiexec.exe /i ./myMSI.msi /qn /L*V ./logfile.txt

Looking at the log below, I was initially thinking that there are still installations pending or
unfinished installations, but after trying on more computers and getting the same as well as investigating this options,
it seems not to be the case.

The log is below.

Thanks in advance for any clues!
Kind regards,
Robert

=== Verbose logging started: 19/01/2020 17:07:52 Build type: SHIP UNICODE 5.00.7601.00 Calling process: C:\Windows\system32\msiexec.exe ===
MSI (c) (94:5C) [17:07:52:050]: Resetting cached policy values
MSI (c) (94:5C) [17:07:52:050]: Machine policy value 'Debug' is 0
MSI (c) (94:5C) [17:07:52:050]: ******* RunEngine:
******* Product: ./myMSI.msi
******* Action:
******* CommandLine: **********
MSI (c) (94:5C) [17:07:52:050]: Client-side and UI is none or basic: Running entire install on the server.
MSI (c) (94:5C) [17:07:52:050]: Grabbed execution mutex.
MSI (c) (94:5C) [17:07:52:159]: Cloaking enabled.
MSI (c) (94:5C) [17:07:52:159]: Attempting to enable all disabled privileges before calling Install on Server
MSI (c) (94:5C) [17:07:52:159]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (54:88) [17:07:52:174]: Running installation inside multi-package transaction C:\Users\robert\msi-installer\MsiBuildSetupFiles\./myMSI.msi
MSI (s) (54:88) [17:07:52:174]: Grabbed execution mutex.
MSI (s) (54:A4) [17:07:52:174]: Resetting cached policy values
MSI (s) (54:A4) [17:07:52:174]: Machine policy value 'Debug' is 0
MSI (s) (54:A4) [17:07:52:174]: ******* RunEngine:
******* Product: C:\Users\robert\msi-installer\MsiBuildSetupFiles\./myMSI.msi

******* Action:
******* CommandLine: **********
MSI (s) (54:A4) [17:07:52:174]: Machine policy value 'DisableUserInstalls' is 0
MSI (s) (54:A4) [17:07:52:221]: SRSetRestorePoint skipped for this transaction.
MSI (s) (54:A4) [17:07:52:221]: Note: 1: 1402 2: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer 3: 2
MSI (s) (54:A4) [17:07:52:221]: Note: 1: 1324 2: ./myMSI.msi 3: 1
MSI (s) (54:A4) [17:07:52:221]: MainEngineThread is returning 2
MSI (s) (54:88) [17:07:52:221]: No System Restore sequence number for this installation.
MSI (s) (54:88) [17:07:52:221]: User policy value 'DisableRollback' is 0
MSI (s) (54:88) [17:07:52:221]: Machine policy value 'DisableRollback' is 0
MSI (s) (54:88) [17:07:52:221]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (54:88) [17:07:52:221]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (54:88) [17:07:52:221]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (54:88) [17:07:52:221]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\InProgress 3: 2
MSI (s) (54:88) [17:07:52:221]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\InProgress 3: 2
MSI (s) (54:88) [17:07:52:221]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (s) (54:88) [17:07:52:221]: Restoring environment variables
MSI (c) (94:5C) [17:07:52:221]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (94:5C) [17:07:52:221]: MainEngineThread is returning 2
=== Verbose logging stopped: 19/01/2020 17:07:52 ===
coroberti
Posts: 18
Joined: Sun Jan 19, 2020 4:11 pm

Re: Silent Installation Fails

1. Replying to my own post and sorry for the buzz:
It appears that when the installed msi file is given as a relative path, msiexec gives this type of error.

The solution is to provide the absolute path and in quotes, i.e.:
msiexec.exe /i "C:\Users\suppo\dev\myMSI.msi" /qn /L*V "C:\Users\suppo\dev\logfile.txt"

Once more, sorry for the buzz.

2. Next question from a newbie: Can the installer run the executable on target after a silent installation?
Although this action has been configured, the exe is not running.
How that could be achieved?

Thanks in advance!
Robert
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Silent Installation Fails

Hello Robert and welcome to Advanced Installer forums,

In what regards your first issue, I am glad you fixed it.

In what regards your second question, yes, that is possible.

In order to achieve that, please proceed as it follows:

- go to "Custom Actions" page

- add a "LaunchFile" custom action, with sequence (simply press the "Add custom action with sequence" button which is placed to the right side of the custom action's name)

- please schedule your custom action after the "Finish Execution" action group.

- in the "File to launch" field, please insert the path to your .EXE file

- under "Execution Options", please disable the "Wait for custom action to finish before proceeding" and "Fail installation if custom action returns an error" options.

- under "Execution Stage Condition", please disable the "Uninstall" and "Maintenance" options, unless you want the custom action to be executed during these stages.

In the end, your Custom Action could look like this:
LaunchFile.png
LaunchFile.png (126.3 KiB) Viewed 4119 times

This way, your .EXE should be launched at the end of your installation.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
coroberti
Posts: 18
Joined: Sun Jan 19, 2020 4:11 pm

Re: Silent Installation Fails

Dear Catalin,
Wow, such a comprehensive and professional answer!
Thank you very much.

Have a great day!
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Silent Installation Fails

You are always welcome, Robert.

Always my pleasure to help.

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

Return to “Common Problems”