|
578 | 578 | <CustomAction="SetIISConfigure"Before="AppSearch">NOT Installed</Custom> |
579 | 579 | </InstallUISequence> |
580 | 580 | <InstallExecuteSequence> |
581 | | - <?if $(var.Win64) ="yes" ?> |
582 | 581 | <CustomAction="SetIISConfigure"Before="AppSearch">NOT Installed</Custom> |
| 582 | + <CustomAction="Cleanup1"After="InstallInitialize"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom> |
| 583 | + <CustomAction="Cleanup2"Before="Cleanup1"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom> |
| 584 | + <CustomAction="Cleanup3"Before="Cleanup2"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom> |
| 585 | + <CustomAction="Cleanup4"Before="Cleanup3"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom> |
| 586 | + <CustomAction="Cleanup5"Before="Cleanup4"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom> |
| 587 | + <?if $(var.Win64) ="yes" ?> |
583 | 588 | <CustomAction="InstallModule64"Before="InstallFinalize"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom> |
584 | 589 | <CustomAction="InstallModule32"After="InstallModule64"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom> |
585 | 590 | <CustomAction="InstallConf"After="InstallModule32"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom> |
586 | 591 | <CustomAction="UninstallConf"Before="RemoveFiles"><![CDATA[Installed AND IIS_SETUP]]></Custom> |
587 | 592 | <CustomAction="UninstallModule32"Before="UninstallConf"><![CDATA[Installed AND IIS_SETUP]]></Custom> |
588 | 593 | <CustomAction="UninstallModule64"Before="UninstallModule32"><![CDATA[Installed AND IIS_SETUP]]></Custom> |
589 | 594 | <?else ?> |
590 | | - <CustomAction="SetIISConfigure"Before="AppSearch">NOT Installed</Custom> |
591 | 595 | <CustomAction="InstallModule32"Before="InstallFinalize"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom> |
592 | 596 | <CustomAction="InstallConf"After="InstallModule32"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom> |
593 | 597 | <CustomAction="UninstallConf"Before="RemoveFiles"><![CDATA[Installed AND IIS_SETUP]]></Custom> |
594 | 598 | <CustomAction="UninstallModule32"After="UninstallConf"><![CDATA[Installed AND IIS_SETUP]]></Custom> |
595 | 599 | <?endif ?> |
596 | 600 | </InstallExecuteSequence> |
| 601 | +<!-- Cleanup: older versions left some settings behind. This is needed to remove--> |
| 602 | +<!-- that old stuff before install this brand new version of ModSecurity.--> |
| 603 | + <?if $(var.Win64) ="yes" ?> |
| 604 | + <CustomActionId="Cleanup1"Execute="deferred"Impersonate="no"Return="ignore"Directory="INSTALLFOLDER"ExeCommand=""[System64Folder]inetsrv\appcmd.exe" clear config -section:"system.webServer/ModSecurity"" /> |
| 605 | + <CustomActionId="Cleanup2"Execute="deferred"Impersonate="no"Return="ignore"Directory="INSTALLFOLDER"ExeCommand=""[System64Folder]inetsrv\appcmd.exe" uninstall module /module.name:"ModSecurity IIS (32bits)"" /> |
| 606 | + <CustomActionId="Cleanup3"Execute="deferred"Impersonate="no"Return="ignore"Directory="INSTALLFOLDER"ExeCommand=""[System64Folder]inetsrv\appcmd.exe" uninstall module /module.name:"ModSecurity IIS (64bits)"" /> |
| 607 | + <CustomActionId="Cleanup4"Execute="deferred"Impersonate="no"Return="ignore"Directory="INSTALLFOLDER"ExeCommand=""[System64Folder]inetsrv\appcmd.exe" uninstall module /module.name:"ModSecurity IIS"" /> |
| 608 | + <CustomActionId="Cleanup5"Execute="deferred"Impersonate="no"Return="ignore"Directory="INSTALLFOLDER"ExeCommand=""[System64Folder]inetsrv\appcmd.exe" uninstall module /module.name:"ModSecurityIIS"" /> |
| 609 | + <?else ?> |
| 610 | + <CustomActionId="Cleanup1"Execute="deferred"Impersonate="no"Return="ignore"Directory="INSTALLFOLDER"ExeCommand=""[SystemFolder]inetsrv\appcmd.exe" clear config -section:"system.webServer/ModSecurity"" /> |
| 611 | + <CustomActionId="Cleanup2"Execute="deferred"Impersonate="no"Return="ignore"Directory="INSTALLFOLDER"ExeCommand=""[SystemFolder]inetsrv\appcmd.exe" uninstall module /module.name:"ModSecurity IIS (32bits)"" /> |
| 612 | + <CustomActionId="Cleanup3"Execute="deferred"Impersonate="no"Return="ignore"Directory="INSTALLFOLDER"ExeCommand=""[SystemFolder]inetsrv\appcmd.exe" uninstall module /module.name:"ModSecurity IIS (64bits)"" /> |
| 613 | + <CustomActionId="Cleanup4"Execute="deferred"Impersonate="no"Return="ignore"Directory="INSTALLFOLDER"ExeCommand=""[SystemFolder]inetsrv\appcmd.exe" uninstall module /module.name:"ModSecurity IIS"" /> |
| 614 | + <CustomActionId="Cleanup5"Execute="deferred"Impersonate="no"Return="ignore"Directory="INSTALLFOLDER"ExeCommand=""[SystemFolder]inetsrv\appcmd.exe" uninstall module /module.name:"ModSecurityIIS"" /> |
| 615 | + <?endif ?> |
597 | 616 | <?if $(var.Win64) ="yes" ?> |
598 | 617 | <CustomActionId="InstallModule32"Execute="deferred"Impersonate="no"Return="check"Directory="INSTALLFOLDER"ExeCommand=""[System64Folder]inetsrv\appcmd.exe" install module /name:"ModSecurity IIS (64bits)" /image:"%SystemRoot%\System32\inetsrv\ModSecurityIIS.dll" /preCondition:"bitness64"" /> |
599 | 618 | <CustomActionId="InstallModule64"Execute="deferred"Impersonate="no"Return="check"Directory="INSTALLFOLDER"ExeCommand=""[System64Folder]inetsrv\appcmd.exe" install module /name:"ModSecurity IIS (32bits)" /image:"%SystemRoot%\SysWOW64\inetsrv\ModSecurityIIS.dll" /preCondition:"bitness32"" /> |
|