TheRocket
Posts: 45
Joined: Thu Jul 26, 2012 6:55 pm

IIS components features optimisation

We are currently working with advanced installer 17.6 and also testing Advanced installer 23.2 and our installation package comprises 2 IIS web applications.

During the installation of our package, the installer will attempt to install the 2 web applications.
Prior to this operation, Advanced installer makes sure he has components on the system to manage the IIS. I believe it runs the "Install-WindowsFeature -Name Web-Scripting-Tools" command or something similar.
On certain systems, this component validation can take several minutes. Behind the scenes, "TiWorker.exe" is eating up 100% cpu for more than 20 minutes. Eventually, the installation will succeed.

On the uninstallation of the package, the IIS operations and web application removal completes quickly.

When installing the same application again, the installation takes a very long time, even if all the required components are in place.
It becomes annoying as :
- we are installing our application package on hundreds of servers.
- we are also relying on CI/CD pipelines for testing our software solution.

We would suggest that Advanced installer would be using the registry to identify if the required iis components are already installed for it's internal use. If so, it could skip the components validations, and proceed quicky with the web applications installation.

Sample log with the delay:

Code: Select all

MSI (s) (F4:E8) [13:24:10:827]: Executing op: ActionStart(Name=AI_IIsConfig,Description=Configuring Internet Information Services,Template=Installing "[1]")
MSI (s) (F4:E8) [13:24:10:827]: Executing op: CustomActionSchedule(Action=AI_IIsConfig,ActionType=11265,Source=BinaryData,Target=**********,CustomActionData=**********)
MSI (s) (F4:40) [13:24:10:840]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSIF0F3.tmp, Entrypoint: OnIIsConfig

(The issue is somewhere here)

MSI (s) (F4:E8) [13:48:56:787]: Executing op: End(Checksum=0,ProgressTotalHDWord=0,ProgressTotalLDWord=0)
MSI (s) (F4:E8) [13:48:56:803]: Note: 1: 2265 2:  3: -2147287035 
MSI (s) (F4:E8) [13:48:56:803]: User policy value 'DisableRollback' is 0
MSI (s) (F4:E8) [13:48:56:803]: Machine policy value 'DisableRollback' is 0
MSI (s) (F4:E8) [13:48:56:818]: Note: 1: 2265 2:  3: -2147287035 
MSI (s) (F4:90) [13:48:56:850]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI9DA4.tmp, Entrypoint: OnAiRemoveFilesCommit
It would be very nice to optimize for a future version.
Catalin
Posts: 7717
Joined: Wed Jun 13, 2018 7:49 am

Re: IIS components features optimisation

Hello,

Apologies for the quite delayed reply here.

Regarding your scenario here, it does not make much sense, at least if I understood it correctly.

Could you please confirm that the issue on your side is during a reinstall (basically a first time install)? If so, this does not make much sense here as this should be the same as for the first time install, which you mentioned is quick (also the uninstall is quick).

Also, do I understand this correctly that the waiting time is the same between version 17.6 and 23.2? I am asking this to confirm that this is not a "problem" that appeared after the upgrade.

Also, is this issue reproducible on all machines, or is it specific to some machine only (because if so, then this might be related to that machine)? For example, if you test this on a clean VM, does the issue still occur?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
TheRocket
Posts: 45
Joined: Thu Jul 26, 2012 6:55 pm

Re: IIS components features optimisation

Hi Catalin,

The high delay is both on the first time install, and on the second/third/fourth/etc. install.
The "uninstall" is quick (components uninstall during upgrades/removal).

The waiting time is very similar between version 17.6 and 23.2, so the behavior didn't change. It wasn't improved either with the latest AI version.
The long waiting time is before creating new site, creating new applications pools and new "web directories".

The waiting time is variable between different machines.
A freshly installed VM may be quicker than a VM built a few months ago.
A VM may suddenly become very slow after an Windows update.
This occurs on our VM's, and also on some of our customers VM's.

We think that the delay is related to a command used by the AI custom dll, that may hang due to Windows features.

We can confirm that the

Code: Select all

DISM /Online /Cleanup-Image /RestoreHealth
returns success, and we ran it twice.

We can confirm that the following powershell commands are quick:

Code: Select all

Install-WindowsFeature Web-Server -IncludeManagementTools
dism /online /enable-feature /featurename:IIS-ASPNET45 /all
Get-WindowsFeature -Name Web-*
We suspect the following command ran by the custom DLL is causing the performance delays:

Code: Select all

DISM /quiet /norestart /english /online /get-features /format:table
We believe this command is executed on IIS installation preparation, but not executed on uninstallation.

We don't have much control over this command or it's execution time from the AIP project.
We can work on resolving "DISM" issues on our VM's internally and at customers sites.

Thus, we suggest to improve AI by bypassing this command, and use registry keys to validate if features are installed already, so the custom dll can proceed immediately with creating new site, creating new applications pools and new "web directories".
We can understand that on the very first installation, it would need to deploy components for IIS management, but subsequent installations should find the components and complete the installation quickly.
Catalin
Posts: 7717
Joined: Wed Jun 13, 2018 7:49 am

Re: IIS components features optimisation

Hello,

Apologies for the quite delayed reply on this.

Thank you very much for the followup on this and for sharing the details with us.

I have forwarded this improvement to our dev team and we will improve this if we will find a relaible way to check the state of the machine instead of dism.exe.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
TheRocket
Posts: 45
Joined: Thu Jul 26, 2012 6:55 pm

Re: IIS components features optimisation

Hi Catalin,

We would like to increase the priority for this situation. The performance seems to be worse on "Windows Server 2025 Standard", where installing a test package with 1 application pool and 1 web application, takes ~17+ minutes to install on any servers we are testing on.

The performance of base command "DISM /norestart /english /online /get-features" seems to print one feature name per second on Windows Server 2025 with most recent updates, compared to a dozen features per second on Windows 11 or Windows 2022.
We did tried to optimize the performance of DISM without much success on Windows 2025, using typical repair commands.

If you have access to a test system, you can give a try at the command, and also try with a brand new test project in Advanced installer 23.5.1. An Enterprise project, with options "run as administrator", add one iis application pool, add one iis web application running under the created application pool, build the setup package and install it on Windows Server 2025. It should take ~17+ minutes to complete the "Configuring Internet Information Services" step. Let us know if you can reproduce this.
Catalin
Posts: 7717
Joined: Wed Jun 13, 2018 7:49 am

Re: IIS components features optimisation

Hello,

Unfortunately, I come with not so good news today. :(

Our dev investigated this for some time now and what happens behind in the registry is a bit of a chaos.

We were not able to find well defined relations between what happens in DISM and in the registries.

We have in plan to do some optimizations about how we use DISM for interrogations - so this might helpe a bit here.

We will try to reproduce this on our end, as per your instructions - thank you for that, by the way.

In the meantime, would you be able to forward me the following logs from Event Viewer:

Windows\Logs\CBS

and

Windows\Logs\DISM

and also tell me the timestamp that we should look for?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
TheRocket
Posts: 45
Joined: Thu Jul 26, 2012 6:55 pm

Re: IIS components features optimisation

Hello!

I've sent the log files by email along with a sample project in 23.6 and some suggestions on where to look for in the registry for the IIS components.

Let us know if you need anything else, and if you would like me to test upcoming betas.

Thanks!
Catalin
Posts: 7717
Joined: Wed Jun 13, 2018 7:49 am

Re: IIS components features optimisation

Hello,

I have received the files, thank you!

I forwarded them to our dev team for further investigations.
Let us know if you need anything else, and if you would like me to test upcoming betas.
Sure thing, I will let you know. :)

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Catalin
Posts: 7717
Joined: Wed Jun 13, 2018 7:49 am

Re: IIS components features optimisation

Hello,

Please note I have sent an email regarding a possible fix for the issue. :)

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
TheRocket
Posts: 45
Joined: Thu Jul 26, 2012 6:55 pm

Re: IIS components features optimisation

Thanks Catalin,

I've sent some test results by email, and I will probably play with it tomorrow more.

Looking forward for the other library mentioned in my email, if you can send me this one too.

Thanks!
Catalin
Posts: 7717
Joined: Wed Jun 13, 2018 7:49 am

Re: IIS components features optimisation

Hello,

Thank you very much for your cooperation on this issue. :)

Let's continue the thread over the email for now and we can update this as soon as we'll have a fix for your specific scenario.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
StefanStolz
Posts: 1
Joined: Mon May 18, 2026 12:59 pm

Re: IIS components features optimisation

Hi,

it looks like that i have the same Problem. Is it possible to get some hints for what to look in the Project-File?

Best regards,

Stefan
Catalin
Posts: 7717
Joined: Wed Jun 13, 2018 7:49 am

Re: IIS components features optimisation

Hello Stefan and welcome to our forums,

Please note I have sent you an email with the improvement on this.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Feature Requests”