Skip to content

Commit f4fcb69

Browse files
committed
chore: add debug information to identify install problems
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
1 parent 906eae5 commit f4fcb69

File tree

1 file changed

+45
-3
lines changed

1 file changed

+45
-3
lines changed

.github/workflows/test-ci-windows.yml

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,26 +187,68 @@ jobs:
187187
- name: Install MSI
188188
shell: pwsh
189189
run: |
190+
Write-Host "=== Pre-Installation Debug Info ==="
191+
192+
# Check MSI file
190193
$msiPath = "${{ github.workspace }}\modsecurityiis.msi"
191194
if (-not (Test-Path $msiPath)) {
192195
Write-Error "MSI file not found at $msiPath"
193196
exit 1
194197
}
198+
Write-Host "MSI file found: $msiPath"
199+
Write-Host "MSI file size: $((Get-Item $msiPath).Length) bytes"
200+
201+
# Check IIS version
202+
$iisVersion = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\InetStp" -Name "MajorVersion" -ErrorAction SilentlyContinue).MajorVersion
203+
Write-Host "IIS Version: $iisVersion"
204+
205+
# Check VC++ redistributables
206+
$vc142x64 = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64" -Name "Installed" -ErrorAction SilentlyContinue).Installed
207+
$vc142x86 = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x86" -Name "Installed" -ErrorAction SilentlyContinue).Installed
208+
Write-Host "VC++ 2019 x64 installed: $vc142x64"
209+
Write-Host "VC++ 2019 x86 installed: $vc142x86"
195210
196-
# Install with logging for debugging
211+
Write-Host "`n=== Starting MSI Installation ==="
212+
213+
# Install with verbose logging
197214
$installLog = "${{ github.workspace }}\install.log"
198215
$installResult = Start-Process -FilePath "msiexec.exe" -ArgumentList @(
199216
"/i", "`"$msiPath`"",
200217
"/qn",
201218
"/norestart",
202-
"/l*", "`"$installLog`""
219+
"/l*vx", "`"$installLog`""
203220
) -Wait -PassThru
204221
222+
Write-Host "Installation process completed with exit code: $($installResult.ExitCode)"
223+
224+
# Check if log file was created
225+
if (Test-Path $installLog) {
226+
$logSize = (Get-Item $installLog).Length
227+
Write-Host "Install log created: $installLog ($logSize bytes)"
228+
229+
Write-Host "`n=== Installation Log Contents ==="
230+
if ($logSize -gt 0) {
231+
Get-Content $installLog -Raw | Write-Host
232+
} else {
233+
Write-Host "WARNING: Log file is empty!"
234+
}
235+
} else {
236+
Write-Host "WARNING: Install log was not created at $installLog"
237+
}
238+
205239
if ($installResult.ExitCode -ne 0) {
240+
Write-Host "`n=== Installation Failed ==="
241+
Write-Host "Exit code: $($installResult.ExitCode)"
242+
Write-Host "Common MSI error codes:"
243+
Write-Host " 1603 - Fatal error during installation"
244+
Write-Host " 1619 - Package could not be opened"
245+
Write-Host " 1620 - Package could not be opened (corrupt)"
246+
Write-Host " 1633 - Platform not supported"
206247
Write-Error "MSI installation failed with exit code $($installResult.ExitCode)"
207-
Get-Content $installLog | Write-Host
208248
exit 1
209249
}
250+
251+
Write-Host "`n=== Installation Successful ==="
210252
211253
$installDir = "C:\Program Files\ModSecurity IIS"
212254
$requiredFiles = @(

0 commit comments

Comments
 (0)