|
578 | 578 | <Custom Action="SetIISConfigure" Before="AppSearch">NOT Installed</Custom>
|
579 | 579 | </InstallUISequence>
|
580 | 580 | <InstallExecuteSequence>
|
581 |
| - <?if $(var.Win64) = "yes" ?> |
582 | 581 | <Custom Action="SetIISConfigure" Before="AppSearch">NOT Installed</Custom>
|
| 582 | + <Custom Action="Cleanup1" After="InstallInitialize"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom> |
| 583 | + <Custom Action="Cleanup2" Before="Cleanup1"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom> |
| 584 | + <Custom Action="Cleanup3" Before="Cleanup2"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom> |
| 585 | + <Custom Action="Cleanup4" Before="Cleanup3"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom> |
| 586 | + <Custom Action="Cleanup5" Before="Cleanup4"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom> |
| 587 | + <?if $(var.Win64) = "yes" ?> |
583 | 588 | <Custom Action="InstallModule64" Before="InstallFinalize"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom>
|
584 | 589 | <Custom Action="InstallModule32" After="InstallModule64"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom>
|
585 | 590 | <Custom Action="InstallConf" After="InstallModule32"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom>
|
586 | 591 | <Custom Action="UninstallConf" Before="RemoveFiles"><![CDATA[Installed AND IIS_SETUP]]></Custom>
|
587 | 592 | <Custom Action="UninstallModule32" Before="UninstallConf"><![CDATA[Installed AND IIS_SETUP]]></Custom>
|
588 | 593 | <Custom Action="UninstallModule64" Before="UninstallModule32"><![CDATA[Installed AND IIS_SETUP]]></Custom>
|
589 | 594 | <?else ?>
|
590 |
| - <Custom Action="SetIISConfigure" Before="AppSearch">NOT Installed</Custom> |
591 | 595 | <Custom Action="InstallModule32" Before="InstallFinalize"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom>
|
592 | 596 | <Custom Action="InstallConf" After="InstallModule32"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom>
|
593 | 597 | <Custom Action="UninstallConf" Before="RemoveFiles"><![CDATA[Installed AND IIS_SETUP]]></Custom>
|
594 | 598 | <Custom Action="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 | + <CustomAction Id="Cleanup1" Execute="deferred" Impersonate="no" Return="ignore" Directory="INSTALLFOLDER" ExeCommand=""[System64Folder]inetsrv\appcmd.exe" clear config -section:"system.webServer/ModSecurity"" /> |
| 605 | + <CustomAction Id="Cleanup2" Execute="deferred" Impersonate="no" Return="ignore" Directory="INSTALLFOLDER" ExeCommand=""[System64Folder]inetsrv\appcmd.exe" uninstall module /module.name:"ModSecurity IIS (32bits)"" /> |
| 606 | + <CustomAction Id="Cleanup3" Execute="deferred" Impersonate="no" Return="ignore" Directory="INSTALLFOLDER" ExeCommand=""[System64Folder]inetsrv\appcmd.exe" uninstall module /module.name:"ModSecurity IIS (64bits)"" /> |
| 607 | + <CustomAction Id="Cleanup4" Execute="deferred" Impersonate="no" Return="ignore" Directory="INSTALLFOLDER" ExeCommand=""[System64Folder]inetsrv\appcmd.exe" uninstall module /module.name:"ModSecurity IIS"" /> |
| 608 | + <CustomAction Id="Cleanup5" Execute="deferred" Impersonate="no" Return="ignore" Directory="INSTALLFOLDER" ExeCommand=""[System64Folder]inetsrv\appcmd.exe" uninstall module /module.name:"ModSecurityIIS"" /> |
| 609 | + <?else ?> |
| 610 | + <CustomAction Id="Cleanup1" Execute="deferred" Impersonate="no" Return="ignore" Directory="INSTALLFOLDER" ExeCommand=""[SystemFolder]inetsrv\appcmd.exe" clear config -section:"system.webServer/ModSecurity"" /> |
| 611 | + <CustomAction Id="Cleanup2" Execute="deferred" Impersonate="no" Return="ignore" Directory="INSTALLFOLDER" ExeCommand=""[SystemFolder]inetsrv\appcmd.exe" uninstall module /module.name:"ModSecurity IIS (32bits)"" /> |
| 612 | + <CustomAction Id="Cleanup3" Execute="deferred" Impersonate="no" Return="ignore" Directory="INSTALLFOLDER" ExeCommand=""[SystemFolder]inetsrv\appcmd.exe" uninstall module /module.name:"ModSecurity IIS (64bits)"" /> |
| 613 | + <CustomAction Id="Cleanup4" Execute="deferred" Impersonate="no" Return="ignore" Directory="INSTALLFOLDER" ExeCommand=""[SystemFolder]inetsrv\appcmd.exe" uninstall module /module.name:"ModSecurity IIS"" /> |
| 614 | + <CustomAction Id="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 | <CustomAction Id="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 | <CustomAction Id="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"" />
|
|
0 commit comments