Restarting app even AutoRestart is disabled in updater - Advanced Installer Community
Rosacek
Posts: 9
Joined: Thu Feb 05, 2015 1:41 pm

Restarting app even AutoRestart is disabled in updater

Hi,
I do not want to restart some EXE during installing update.
Therefore I disabled AutoRestart in updates.txt

But the problem is that if some EXE files are used during install, then installer shows MsiRMFilesInUse and all used EXE files are restarted after install, regardless on AutoRestart setting in update.txt
I am confused why AutoRestart is defined when it has almost no efect.

I tried to find solution in forum and it looks like I have to follow:
http://www.advancedinstaller.com/user-g ... ocess.html
http://www.advancedinstaller.com/forums ... 235#p72517
http://www.advancedinstaller.com/user-g ... #section52

If that is still true, you might make a clear note in AI documentation about such installer behavior with link to detection and stop process.

And also I have found now mistake in DOC
In http://www.advancedinstaller.com/user-g ... ocess.html you write:
In this case the custom action should use the "Execute only once if present in both sequence tables" option in the Custom Action Properties page.
But in 11.8 I cannot find such option, also is not mentioned in http://www.advancedinstaller.com/user-g ... rties.html

So how to execute only once?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Restarting app even AutoRestart is disabled in updater

Hello,
the problem is that if some EXE files are used during install, then installer shows MsiRMFilesInUse
This dialog ("FilesInUse" on XP and "MsiRMFilesInUse" on Vista) is shown automatically by Windows Installer during the InstallValidate standard action when the installer checks if any file is in use and if so, it displays that dialog.

Indeed, this dialog can be avoided by running a Detect and Stop custom actions before the install/uninstall process which stops the processes which use the files.
For details, please see the Detect or stop a process How-to article.
In this case the custom action should use the "Execute only once if present in both sequence tables" option in the Custom Action Properties page.
For this, you can select the Advanced execution scenarios link from the custom actions properties to display the Advanced Execution Scenarios Dialog, as you can see below:
CA_Sample.png
CA_Sample.png (23.81 KiB) Viewed 3404 times
Please let me know if you have other questions.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Rosacek
Posts: 9
Joined: Thu Feb 05, 2015 1:41 pm

Re: Restarting app even AutoRestart is disabled in updater

Hi Dan, thanks I found this way.

I put detect and stop actions both to Wizard Dialog Stage and to Install execution stage.
Should I switch in Advanced Execution Scenarios from "Always execute" to "Skip action in Install Execution Stage if executed in Dialogs Stage" ? Or does not matter?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Restarting app even AutoRestart is disabled in updater

Hi,

Yes, it is a good practice.
If there is anything else I can help you with, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”