We need use the xmlconfig to update the applicationHost.config under C:\Windows\System32\inetsrv\config. And the action should run after ConfigureIIs.
But by default the XmlConfig will run before ConfigureIIs.
Could you please give some clue?
Under my team member's help. Add the following ExecuteSequence will resolve the issue.
<InstallExecuteSequence>
<Custom Action="SchedXmlConfig" After="ConfigureIIs"/>
</InstallExecuteSequence>