Disable autorun after reboot - Advanced Installer Community
ags17
Posts: 13
Joined: Tue Oct 04, 2016 7:53 am

Disable autorun after reboot

Hi,

I have an issue with installer:
When I reboot my PC during the installation (when prerequisites are installing), it show "This package can only be run from a bootstrapper" after Windows is loaded.
I've found that it happens because of launching the downloaded msi file from temp path ("Web installer" package type)
So, my question: Is it possible to prevent installer from autorun after reboot?

Thanks!
ags17
Posts: 13
Joined: Tue Oct 04, 2016 7:53 am

Re: Disable autorun after reboot

Steps to reproduce:

1. Build the project (web intaller type)
2. Run intaller
3. Click Next->Next->Install
4. Wait until prerequisites are downloaded
5. When prerequisites is installing logoff-login or reboot system

Actual result: Setup shows "This package can only be run from a bootstrapper" (please see video https://goo.gl/yDgzDd )
Expected result: Setup continue in normal mode (or not starting)

I've attached logs and demo project
demo.zip
(9.11 KiB) Downloaded 233 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Disable autorun after reboot

Hi,

We tested the sample project you sent to us and the behavior was as expected – the setup is resuming after the reboot and continues the installation process. We could not reproduce the problem you mentioned. Can you replicate the behavior on multiple clean machines?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ags17
Posts: 13
Joined: Tue Oct 04, 2016 7:53 am

Re: Disable autorun after reboot

Eusebiu wrote:Hi,

We tested the sample project you sent to us and the behavior was as expected – the setup is resuming after the reboot and continues the installation process. We could not reproduce the problem you mentioned. Can you replicate the behavior on multiple clean machines?

Best regards,
Eusebiu
I've tested it on another machines and results are the same.
I've updated demo project in order to make it self-sufficient and easier to reproduce.
Steps are the same:
1. Build the project (EXE setup with resource next to it / Web installer)
2. Run intaller
3. Click Next->Next->Install
4. Wait until prerequisites are downloaded and runned (but not intall them).
5. logoff-login or reboot system
Actual result: Setup shows "This package can only be run from a bootstrapper"
Expected result: Setup continue in normal mode (or not starting)

Image
Attachments
1.aip
(17.6 KiB) Downloaded 338 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Disable autorun after reboot

Hi,

Indeed, I was able to reproduce the problem. Thank you for the demo project.

That message is actually a launch condition added in each MSI package that has a bootstrapper. You can see more details in the "Why do I receive the "This package can only be run from a bootstrapper" message" FAQ.

To avoid it and resume installation as expected after the reboot, you can create the "SETUPEXEDIR" property in the "Install Parameters" page of your project and assign any value to it. This property is used by the launch condition mentioned above and setting it to any value will suppress that message from being displayed.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ags17
Posts: 13
Joined: Tue Oct 04, 2016 7:53 am

Re: Disable autorun after reboot

Eusebiu wrote:Hi,

Indeed, I was able to reproduce the problem. Thank you for the demo project.

That message is actually a launch condition added in each MSI package that has a bootstrapper. You can see more details in the "Why do I receive the "This package can only be run from a bootstrapper" message" FAQ.

To avoid it and resume installation as expected after the reboot, you can create the "SETUPEXEDIR" property in the "Install Parameters" page of your project and assign any value to it. This property is used by the launch condition mentioned above and setting it to any value will suppress that message from being displayed.

Best regards,
Eusebiu
Thanks for this workaround. Unfortunately it doesn't work very well for "Web installer" type of installer.
After restart of the PC it resumes the installations, but fails when it comes to installing of entire application (note: the installer must have at least one *.cab file) with following error:
Image
I've attached updated demo project. Note: installer must be accessible by the following url - http://localhost:81/apps/1.msi.

Is there a way to disable auto-resume after restart of the PC if it is not possible to resolve described issue in current version on advanced installer?
Attachments
1.aip
(18.16 KiB) Downloaded 280 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Disable autorun after reboot

Hi,

I reproduced this problem, too. However, I'm afraid that this is a Windows limitation. You can see more details in the "minor patch update error" thread which discusses about the same issue.

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

Return to “Common Problems”