matt.luthi@gmail.com
Posts: 44
Joined: Thu Jun 20, 2013 4:42 am

Re: MSI installer with prerequisite (Post-install) reboot?

Dan wrote:Hi Matt,

I've attached a sample project to this thread, so if you are interested to take a look directly at my project, you are more than welcome to download the ZIP file.

If you have any question, please let me know.

Best regards,
Dan
Hi Dan, thanks for your help so far. But it turns out that your sample project is not properly working. I am getting an msiexec popup after EVERY reboot following the installation of your sample project. It seems that when the helper installer causes the reboot to happen, the main installer is left in an incomplete state. It leaves entries in the registry to start up on reboot but these fail. I tested this on other computers as well with the same result. The reason I only found this out now is because I never clicked "ok" to actually reboot before.

Please review the attached files for further details. It appears that on login after a reboot, msiexec is called with a "/cmdloc" flag to instruct it to obtain the parameters from a registry key but I have not found this flag anywhere on the microsoft installer documentation.
msiexec-popup-after-reboot.png
msiexec-popup-after-reboot.png (69.14 KiB) Viewed 9989 times
msiexec-popup-task-manager-command-line.png
msiexec-popup-task-manager-command-line.png (191.88 KiB) Viewed 9989 times
registry-entry-full-command-see-txt-file.png
registry-entry-full-command-see-txt-file.png (99.09 KiB) Viewed 9989 times
Full registry run command params:
/i "C:\Users\matt.luthi\Downloads\Sample\Sample\MainPackage\MainPackage-SetupFiles\MainPackage.msi" AI_RESUME=1 ADDLOCAL=MainFeature,YourApplication ACTION="INSTALL" EXECUTEACTION="INSTALL" ROOTDRIVE="C:\" AI_PREREQDIRS="C:\Users\matt.luthi\AppData\Roaming\Your Company\Your Application\prerequisites" TARGETDIR="C:\" APPDIR="C:\Program Files\Your Company\Your Application\" SET_REQUIRE_REBOOT="CheckBox"
The only way to remove this popup is to edit the registry directly or use the msconfig utilty. Downside of the msconfig utiltiy is that the registry entry remains, it's just being ignored.

I have doubts that I can't actually achieve what I need to achieve using Advanced Installer.

What I need to achieve is:
1. If the pre-requisite is not installed or needs to be upgraded, a reboot has to happen at the end of the main installation or the upgrade.
2. If the pre-requisite does not have to installed or upgraded, no reboot should happen.
3. The installer needs to be deployed with minimum user interface, using deployment tools such as policies and others. (Silent)

I have found that by using a chained pre-requisite, it is installed on removal of the software which is desired. So I would like to keep the installation of the pre-requisite chained.

I am hoping we can resolve this somehow. Am getting pretty desperate.

Thanks,
Matt
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: MSI installer with prerequisite (Post-install) reboot?

Hi Matt,

I think there might be another approach for this.
When adding the prerequisite and defining its install conditions the AI_AppSearchEx table is created in the Table Editor page.
As you can see, a property is assigned to the related install condition. You can use the related property in order to condition the execution of the set installer property predefined custom action.
Please take a look on the attached sample project which implements this scenario.

Unfortunately, this approach does not check if the prerequisite has been successfully installed. It only checks if the prerequisite needs to be installed. If it does, then it sets the REBOOT property. If the prerequisite does not need to be installed, the property is not set.

Please let me know if that helped.

Best regards,
Dan
Attachments
SampleApp.zip
(622.62 KiB) Downloaded 603 times
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
matt.luthi@gmail.com
Posts: 44
Joined: Thu Jun 20, 2013 4:42 am

Re: MSI installer with prerequisite (Post-install) reboot?

Hi Dan,

this does only work if the prerequisite is not set as a "chained" package. This would be fine if I was able to remove the prerequisite on uninstallation of the main package which happens automatically with a chained package. I tried to do this: http://www.advancedinstaller.com/user-g ... l-msi.html
but that no longer works. The documentation is out of step a bit there.

Any other ideas?

Matt
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: MSI installer with prerequisite (Post-install) reboot?

Hi Matt,

As a request from you in the Update documentation request forum thread, can you please review your project and see if you missed any step?

Please note that if you want to uninstall the prerequisite when your main installation package is uninstalled/removed, you can do add the corresponding command line statement in the Maintenance Command Lines fields from the Prerequisite Setup Files Tab.

These options allow you to repair or uninstall the prerequisite when the main package is in maintenance mode:
  • Repair using this command line - repairs the prerequisite when the main package is repaired during maintenance.
  • Uninstall using this command line - removes the prerequisite when the main package is uninstalled.
Please let me know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
matt.luthi@gmail.com
Posts: 44
Joined: Thu Jun 20, 2013 4:42 am

Re: MSI installer with prerequisite (Post-install) reboot?

Hi Dan,

I'll check the pre-requisite settings. Thanks.
mguenth83
Posts: 38
Joined: Wed Dec 31, 2014 11:02 am

Re: MSI installer with prerequisite (Post-install) reboot?

Hi,
i have since two Days the same Problem.

The key added on Install after the PreReq extracted.

So why he added this key, i seems that he could not write in HCKU or something else.

The Currious is that in my virtual machine work, but on an Domain Machine it doesnt.

Thx
Matthias
mguenth83
Posts: 38
Joined: Wed Dec 31, 2014 11:02 am

Re: MSI installer with prerequisite (Post-install) reboot?

Hi i think i found out why this Problem decribed below happend.
I found out that this cames if i habe not the rights for some Operation.

So ist Simple...

do not run MSI or Advanced installer as User, run this as System Account.

i have a litte Script for this..
Copy Psexec and MSI.ps1 to C:Windows\System32
Copy Link to Desktop or where you want...
Copy the our MSI File to C:\Data

Runs the Script as Administrator because UAC
Attachments
psexec.zip
(193.02 KiB) Downloaded 474 times
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: MSI installer with prerequisite (Post-install) reboot?

Hello Matthias,

I'm afraid I need a more accurate test case scenario. Can you please give us a detailed step by step test case scenario which we can easily follow?

Also, please send us the .aip (project file) of your setup package which you are installing under the System account to support at advancedinstaller dot com so we can investigate its settings and thoroughly test on our side.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”