Umarlone
Posts: 20
Joined: Mon Oct 23, 2017 7:15 pm

Edit xml file on condition.

Hello Team,

I am trying to edit web.config file based on search. There is this WebDAV publishing module which if is already enabled in IIS ,it messes up with PUT and DELETE requests. So i created a search in AI where search is "Registery value exists" and value = HKLM\SOFTWARE\Microsoft\InetStp\Components\WebDAV. so now during first installation or update the search returns that Value exists I want insert the following elements inside the <system.webServer> here </system.webServer>
<modules runAllManagedModulesForAllRequests="false">
<remove name="WedbDAVModule" />
</modules>

I tried to edit web.config file , AI wont read it xml but opens it in note pad.
how do I execute that "search" and edit that web.config file if that registery value is found?

Thank you very much for your help......
Umarlone
Posts: 20
Joined: Mon Oct 23, 2017 7:15 pm

Re: Edit xml file on condition.

Hello There,
I kind of solve the problem by search if Web DAV is enabled, prompt a dialog to user to remove it.
I have one more request. How do I prompt user to restart checkbox and if checkbox is checked and user click on finish , system should restart. I want this reboot happen on first time installs not the update time. so I followed this: https://www.advancedinstaller.com/user- ... stall.html
and add condtion Not Oldproducts and Reboot_Check on finish button, it does seem to work.

Thank you
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Edit xml file on condition.

Hi,

Do you say that you got the reboot behavior to work after you followed that tutorial? Did you encounter any issue implementing it?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Umarlone
Posts: 20
Joined: Mon Oct 23, 2017 7:15 pm

Re: Edit xml file on condition.

No , the reboot isn't working. How would I do That? Condition is that only at the time first install ,user should be prompted to restart , which is the checkbox ,it checked and used clicks on finish, computer restarts . This needs to done because .net core needs restart after installation ,which is prerequisite. This is pain from Microsoft .is there a way get around from restarting after first install because you guys support .net core as predefined prerequisite, you guy must have insights . Thank you ,really appreciate your help .
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Edit xml file on condition.

Hi,

Isn't your machine restarting when you select the reboot checkbox? Can you please send me the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com, so I can investigate them?

I'm afraid that the reboot cannot be avoided if the .NET prerequisite requires it.

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

Return to “Common Problems”