dybalabj
Posts: 58
Joined: Thu Jan 09, 2014 2:00 am

AI_DownloadPrereq Return code 3

Hello,

I have a Professional setup package with a web-based Post-install prerequisite. Sometimes this prerequisite downloads and installs OK, but sometimes the AI_DownloadPrereq custom action fails with a return code of 3. I've generated a versbose log, but I don't see any additional details as to why the download is having problems.

**EDIT** Due to confidentiality reasons, I've removed the project files and log file from the attachments, and emailed them to your support team.

Thanks,

Brandon
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: AI_DownloadPrereq Return code 3

Hello Brandon,

I'm not sure why this happens. Can you please make sure that exists an active Internet connection on your problematic machines and also there are no proxy servers on your network which could block the prerequisite download? Also, please verify that there is no firewall or antivirus program which blocks your setup package to download the prerequisite.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dybalabj
Posts: 58
Joined: Thu Jan 09, 2014 2:00 am

Re: AI_DownloadPrereq Return code 3

Daniel,

I ran some more tests and found the following:

1. Test computer is running Windows 7 x64.
2. The test computer has no antivirus.
3. Windows firewall was disabled.
4. Windows user account is an Administrator.
5. The AIP project indicates the setup exe should run as Administrator.
5. When UAC is enabled, running the setup exe fails as described in my first post.
6. If I extract the setup files and run the MSI directly with UAC enabled, the install fails in the same way.
7. If I open a command prompt as Administrator, and then run the msi, the install succeeds. Running the exe as Administrator still fails.
8. When UAC is disabled, I can run the setup MSI directly without running as Administrator, and the install succeeds. The exe still fails.

I hope this information is useful.

Brandon
dybalabj
Posts: 58
Joined: Thu Jan 09, 2014 2:00 am

Re: AI_DownloadPrereq Fails when running as Admin

Daniel,

After some further testing, I've narrowed down the issue to administrator privileges. My prerequisite does require admin privileges during install, but my main application does not. If I uncheck "Run as administrator" in the application's AIP, then the prerequisite downloads and installs successfully. However, if I right-click on the setup exe and select "Run as administrator", I get the same error as before. This happens whether I set my prerequisite as a Feature-based or Post-install prerequisite.

This issue is not limited to my own prerequisite. I tried specifying the predefined prerequisite for "Visual C++ 2010 SP1 x86" as a feature-based prerequisite, and it behaves the same way (download fails when running as Admin, download and install succeeds when running under normal user privileges).

Brandon
Teodor
Posts: 73
Joined: Thu Jul 25, 2013 9:56 am

Re: AI_DownloadPrereq Return code 3

Hi
dybalabj wrote:This issue is not limited to my own prerequisite. I tried specifying the predefined prerequisite for "Visual C++ 2010 SP1 x86" as a feature-based prerequisite, and it behaves the same way (download fails when running as Admin, download and install succeeds when running under normal user privileges).
I couldn't reproduce this behaviour with our Visual C++ 2010 SP1 x86 (MFC Security Update) predefined prerequisite. I've tested the EXE on Windows 7 64-bit with Administrator (no UAC prompt).

Best regards
Attachments
AI-P f28885.zip
(4.03 KiB) Downloaded 838 times
Teodor Micu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dybalabj
Posts: 58
Joined: Thu Jan 09, 2014 2:00 am

Re: AI_DownloadPrereq Return code 3

Teodor,

I tested the file you attached, and running the setup as Administrator with UAC set to Default still gives the same error. If I disable UAC, then the installer works, even as Administrator.

Also, the project file you attached generates a setup file called "AI-P f28885.exe". If I rename this to "setup.exe" and then run as Administrator with UAC enabled, then the prerequisite downloads and installs successfully.

I should also mention that when the installer fails, the bootstrapper exe and related msiexec processes do not exit when clicking the "Finish" button on the installer.

Thanks,

Brandon
Teodor
Posts: 73
Joined: Thu Jul 25, 2013 9:56 am

AI_DownloadPrereq Return code 3

Hi
dybalabj wrote:I tested the file you attached, and running the setup as Administrator with UAC set to Default still gives the same error.
I've tested again on Windows 7 64-bit directly from the built-in Administrator account. The only change from first version was to add parameters to quietly install the prerequisite. Even so, the outcome was the same: application and prerequisite were installed with SUCCESS.
dybalabj wrote:If I disable UAC, then the installer works, even as Administrator.
If you run as built-in Administrator, the UAC does not apply (by default). Please retest on a clean system, the behaviour you described should not exist for the built-in Administrator.

Best regards
Attachments
AI-P f28885 run.zip
(4.04 KiB) Downloaded 790 times
Teodor Micu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dybalabj
Posts: 58
Joined: Thu Jan 09, 2014 2:00 am

Re: AI_DownloadPrereq Return code 3

Ah, I think I see the difference. I'm logged into an account with Administrator privileges, but not the built-in Administrator account (I believe this account is disabled by default). When I said I would "run as Administrator", I was referring to right-clicking on the exe and selecting the "Run as Administrator" menu item. I will try logging into the built-in Administrator account and let you know what happens.
dybalabj
Posts: 58
Joined: Thu Jan 09, 2014 2:00 am

Re: AI_DownloadPrereq Return code 3

I did reproduce your behavior when logging into the built-in Administrator account. I still have the "Installer ended prematurely because of an error" message when logged in as any other user, but running the installer as Administrator. The MSI log indicates the error occurs somewhere in the AI_DownloadPrereq custom action.
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: AI_DownloadPrereq Return code 3

Hello,

I'm not sure why this happens. Can you please tell us if you could replicate the behavior on multiple clean machines? We always recommend to be used for testing purposes virtual machines because you can easily revert to a clean state of your testing OS.

Also, please keep in mind that the prerequisite packages are extracted/downloaded in the location set in the "Prerequisites page -> Packages tree root -> Download/extraction folder" field. By default this path is pointing to the following location:

Code: Select all

[AppDataFolder][|Manufacturer]\[|ProductName]\prerequisites
Can you please make sure the user account under which you are running the installation has write privileges on "AppDataFolder" from the related machine? Also, can you change the "Download/extraction folder" field to use a path like this:

Code: Select all

[TempFolder][|Manufacturer]\[|ProductName]\prerequisites
and see if this helps?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dybalabj
Posts: 58
Joined: Thu Jan 09, 2014 2:00 am

Re: AI_DownloadPrereq Return code 3

I tried extracting the prerequisites to a temp folder, as well as directly to the C:\ drive, but the error still occurs. I did confirm that the user has write access to the AppDataFolder (considering it's in the user's profile directory, I expected it would).

I have been doing all of my testing on a virtual machine, and I though my base snapshot was a clean install, but apparently not. My base snapshot includes TortoiseSVN and VMWare Tools, but that's all I could see that's different. I tried creating a new VM with a fresh install of Windows, and everything is working fine. So it's definitely something specific to that VM, but I haven't been able to identify it yet. Even if it happens to be a rare case, I'd prefer to solve this issue before releasing the installer with a feature-based URL prerequisite - I'd rather not take a chance that a customer happens to have this same problem.

Brandon
dybalabj
Posts: 58
Joined: Thu Jan 09, 2014 2:00 am

Re: AI_DownloadPrereq Return code 3

Is there any way I can determine what specific error the AI_DownloadPrereq custom action generated? The most details I can get out of the verbose MSI log is just a generic "1603" error. If there was a way to get more information from the custom action, I could probably pinpoint a more specific cause (permissions, path issue, etc).
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: AI_DownloadPrereq Return code 3

Hello,

I've opened a ticket in our bug tracking system so we can investigate further this issue. In order to investigate this further we need to build a debug DLL of our application which will log more info during installation. However, this may take a while. I'll send you a debug DLL as soon as our development team handling the prerequisites support finishes it. Thank you for your patience.

In the meantime, can you please tell us if you could open your prerequisite download URL in "Internet Explorer" browser and if the download succeeds? Also, please specify if you have any proxy server enabled for "Internet Explorer" browser ( "Tools -> Internet Options -> Connections -> LAN Settings").

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dybalabj
Posts: 58
Joined: Thu Jan 09, 2014 2:00 am

Re: AI_DownloadPrereq Return code 3

Daniel,

Thanks for getting the debug DLL started, I appreciate the support.

In answer to your questions, I do not have a proxy server enabled in IE. I also tried downloading the Visual C++ installer from IE using the URL defined in the AIP file, and it downloads and installs just fine. I tried running IE and the installer both as my regular Admin user, and "As Administrator" (when not logged into the built-in Admin account, with UAC enabled), and all 4 combinations succeeded.

Thanks,

Brandon
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: AI_DownloadPrereq Return code 3

Hello Brandon,

I've sent you an e-mail containing a debug DLL which will help you logging more info about the related failure.

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

Return to “Common Problems”