AndyL
Posts: 22
Joined: Tue Jan 26, 2021 12:58 pm

Prerequisite download where the URL is a redirect (WebView2)

I have a custom prerequisite set up for MS WebView2, with the URL https://go.microsoft.com/fwlink/p/?LinkId=2124703. This is Microsoft's permalink that redirects to the latest version of the WebView2 runtime. It currently does a 301 redirect to https://msedge.sf.dl.delivery.mp.micros ... 2Setup.exe, but this will change next time MS updates the WebView2 runtime.

In AI 20.1, it worked. In AI 20.9, it no longer works.

The issue seems to be how AI is handling a URL that is a redirect rather than a direct link to a .exe file. It seems to be using the original URL to name the downloaded file, instead of the URL it got redirected to.

In AI 20.1, the downloaded file got saved in the temp folder as "go.microsoft.com", and I guess it ran successfully because by coincidence, .com is an executable file extension.

AI 20.9 saves the downloaded file as "LinkId=2124703". Windows doesn't know what to do with that and throws up the "How do you want to open this file" dialog.

How do I handle this? Can I tell AI what name to give the downloaded file?
AndyL
Posts: 22
Joined: Tue Jan 26, 2021 12:58 pm

Re: Prerequisite download where the URL is a redirect (WebView2)

As per the user guide here, I've tried putting "WebView2?MicrosoftEdgeWebview2Setup.exe" in the "Folder" field for the prerequisite, but it doesn't work. Actually it seems to be ignoring the Folder setting entirely, which is also a change from 20.1. In 20.1, it would download the prerequisite installer to the folder I specified underneath AppData\Roaming\MyCompany\MyProduct\prerequisites. In 20.9, it seems to create a random-named folder regardless of what I put in the Folder field.
Liviu
Posts: 1048
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Prerequisite download where the URL is a redirect (WebView2)

Hello,

Thank you for bringing the issue to our attention. We understand the frustration it may have caused you, and we apologize for any inconvenience you've experienced.

I've been able to reproduce this and indeed the extraction folder defined in Advanced Installer is ignored.

We want to assure you that our development team is actively investigating the issue and working on a fix. Your feedback has been invaluable in helping us identify and address this problem. We will keep you informed about the progress and notify you once the fix is ready.

Until then, you can try using our predefined URL for the Microsoft Edge WebView2 Runtime (web installer) prerequisite:
webview2.png
webview2.png (36.29 KiB) Viewed 8580 times
or remain with version 20.8 until the problem is fixed.

We constantly update the WebView2 predefined prerequisite to the latest version.

Hope this helps!

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Prerequisite download where the URL is a redirect (WebView2)

Hello,

This has been fixed in version 21.0 of Advanced Installer, released on September 5th, 2023.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dr_oli
Posts: 3
Joined: Fri Apr 05, 2024 2:14 pm

Re: Prerequisite download where the URL is a redirect (WebView2)

Hi AI team,

looks like that this problem is back in 21.5.1.

In my project, I need to include as prereq WebView2.

To do that I was:

1. Adding package for WebView2 where I entered link to https://go.microsoft.com/fwlink/p/?LinkId=2124703
2. but recently when I tried to install application on computer without WebView2 I was getting error 4154 that WebView2 prerequisites was not properly installed
3. Going over your forum I foundthis topic where your recommended change to https://msedge.sf.dl.delivery.mp.micros ... 2setup.exe which is one of previous versions of WebView2 and when I set that I want installation in Full UI it worked properly. According to forum topic this was fixed in 21.0 but it looks like regression.


Can you please check?

Thx,
Oliver
Liviu
Posts: 1048
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Prerequisite download where the URL is a redirect (WebView2)

Hello Oliver,

I replied to the other thread you posted here.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”