Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit10db384

Browse files
author
Felipe "Zimmerle" Costa
committed
iis: Adds cleanup methods to the installer
Older versions of ModSecurity left files/configurations behind. This commitadds capability to cleanup the IIS configuration files.
1 parentf8f06f7 commit10db384

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

‎iis/installer.wxs‎

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,22 +578,41 @@
578578
<CustomAction="SetIISConfigure"Before="AppSearch">NOT Installed</Custom>
579579
</InstallUISequence>
580580
<InstallExecuteSequence>
581-
<?if $(var.Win64) ="yes" ?>
582581
<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" ?>
583588
<CustomAction="InstallModule64"Before="InstallFinalize"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom>
584589
<CustomAction="InstallModule32"After="InstallModule64"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom>
585590
<CustomAction="InstallConf"After="InstallModule32"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom>
586591
<CustomAction="UninstallConf"Before="RemoveFiles"><![CDATA[Installed AND IIS_SETUP]]></Custom>
587592
<CustomAction="UninstallModule32"Before="UninstallConf"><![CDATA[Installed AND IIS_SETUP]]></Custom>
588593
<CustomAction="UninstallModule64"Before="UninstallModule32"><![CDATA[Installed AND IIS_SETUP]]></Custom>
589594
<?else ?>
590-
<CustomAction="SetIISConfigure"Before="AppSearch">NOT Installed</Custom>
591595
<CustomAction="InstallModule32"Before="InstallFinalize"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom>
592596
<CustomAction="InstallConf"After="InstallModule32"><![CDATA[NOT Installed AND IIS_SETUP]]></Custom>
593597
<CustomAction="UninstallConf"Before="RemoveFiles"><![CDATA[Installed AND IIS_SETUP]]></Custom>
594598
<CustomAction="UninstallModule32"After="UninstallConf"><![CDATA[Installed AND IIS_SETUP]]></Custom>
595599
<?endif ?>
596600
</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="&quot;[System64Folder]inetsrv\appcmd.exe&quot; clear config -section:&quot;system.webServer/ModSecurity&quot;" />
605+
<CustomActionId="Cleanup2"Execute="deferred"Impersonate="no"Return="ignore"Directory="INSTALLFOLDER"ExeCommand="&quot;[System64Folder]inetsrv\appcmd.exe&quot; uninstall module /module.name:&quot;ModSecurity IIS (32bits)&quot;" />
606+
<CustomActionId="Cleanup3"Execute="deferred"Impersonate="no"Return="ignore"Directory="INSTALLFOLDER"ExeCommand="&quot;[System64Folder]inetsrv\appcmd.exe&quot; uninstall module /module.name:&quot;ModSecurity IIS (64bits)&quot;" />
607+
<CustomActionId="Cleanup4"Execute="deferred"Impersonate="no"Return="ignore"Directory="INSTALLFOLDER"ExeCommand="&quot;[System64Folder]inetsrv\appcmd.exe&quot; uninstall module /module.name:&quot;ModSecurity IIS&quot;" />
608+
<CustomActionId="Cleanup5"Execute="deferred"Impersonate="no"Return="ignore"Directory="INSTALLFOLDER"ExeCommand="&quot;[System64Folder]inetsrv\appcmd.exe&quot; uninstall module /module.name:&quot;ModSecurityIIS&quot;" />
609+
<?else ?>
610+
<CustomActionId="Cleanup1"Execute="deferred"Impersonate="no"Return="ignore"Directory="INSTALLFOLDER"ExeCommand="&quot;[SystemFolder]inetsrv\appcmd.exe&quot; clear config -section:&quot;system.webServer/ModSecurity&quot;" />
611+
<CustomActionId="Cleanup2"Execute="deferred"Impersonate="no"Return="ignore"Directory="INSTALLFOLDER"ExeCommand="&quot;[SystemFolder]inetsrv\appcmd.exe&quot; uninstall module /module.name:&quot;ModSecurity IIS (32bits)&quot;" />
612+
<CustomActionId="Cleanup3"Execute="deferred"Impersonate="no"Return="ignore"Directory="INSTALLFOLDER"ExeCommand="&quot;[SystemFolder]inetsrv\appcmd.exe&quot; uninstall module /module.name:&quot;ModSecurity IIS (64bits)&quot;" />
613+
<CustomActionId="Cleanup4"Execute="deferred"Impersonate="no"Return="ignore"Directory="INSTALLFOLDER"ExeCommand="&quot;[SystemFolder]inetsrv\appcmd.exe&quot; uninstall module /module.name:&quot;ModSecurity IIS&quot;" />
614+
<CustomActionId="Cleanup5"Execute="deferred"Impersonate="no"Return="ignore"Directory="INSTALLFOLDER"ExeCommand="&quot;[SystemFolder]inetsrv\appcmd.exe&quot; uninstall module /module.name:&quot;ModSecurityIIS&quot;" />
615+
<?endif ?>
597616
<?if $(var.Win64) ="yes" ?>
598617
<CustomActionId="InstallModule32"Execute="deferred"Impersonate="no"Return="check"Directory="INSTALLFOLDER"ExeCommand="&quot;[System64Folder]inetsrv\appcmd.exe&quot; install module /name:&quot;ModSecurity IIS (64bits)&quot; /image:&quot;%SystemRoot%\System32\inetsrv\ModSecurityIIS.dll&quot; /preCondition:&quot;bitness64&quot;" />
599618
<CustomActionId="InstallModule64"Execute="deferred"Impersonate="no"Return="check"Directory="INSTALLFOLDER"ExeCommand="&quot;[System64Folder]inetsrv\appcmd.exe&quot; install module /name:&quot;ModSecurity IIS (32bits)&quot; /image:&quot;%SystemRoot%\SysWOW64\inetsrv\ModSecurityIIS.dll&quot; /preCondition:&quot;bitness32&quot;" />

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp