@@ -167,6 +167,23 @@ jobs:
167167 name : modsecurityiis-installers-${{ matrix.config }}
168168 path : ${{ github.workspace }}/
169169
170+ - name : Install VC++ 2019 Redistributables (Prerequisites)
171+ shell : pwsh
172+ run : |
173+ Write-Host "Installing Visual C++ 2019 Redistributable (x64)..."
174+ $vc_x64_url = "https://aka.ms/vs/17/release/vc_redist.x64.exe"
175+ $vc_x64_installer = "${{ github.workspace }}\vc_redist.x64.exe"
176+ Invoke-WebRequest -Uri $vc_x64_url -OutFile $vc_x64_installer
177+ Start-Process -FilePath $vc_x64_installer -ArgumentList "/install", "/quiet", "/norestart" -Wait
178+
179+ Write-Host "Installing Visual C++ 2019 Redistributable (x86)..."
180+ $vc_x86_url = "https://aka.ms/vs/17/release/vc_redist.x86.exe"
181+ $vc_x86_installer = "${{ github.workspace }}\vc_redist.x86.exe"
182+ Invoke-WebRequest -Uri $vc_x86_url -OutFile $vc_x86_installer
183+ Start-Process -FilePath $vc_x86_installer -ArgumentList "/install", "/quiet", "/norestart" -Wait
184+
185+ Write-Host "VC++ 2019 Redistributables installed successfully"
186+
170187 - name : Install MSI
171188 shell : pwsh
172189 run : |
@@ -175,7 +192,7 @@ jobs:
175192 Write-Error "MSI file not found at $msiPath"
176193 exit 1
177194 }
178-
195+
179196 # Install with logging for debugging
180197 $installLog = "${{ github.workspace }}\install.log"
181198 $installResult = Start-Process -FilePath "msiexec.exe" -ArgumentList @(
@@ -184,7 +201,7 @@ jobs:
184201 "/norestart",
185202 "/l*", "`"$installLog`""
186203 ) -Wait -PassThru
187-
204+
188205 if ($installResult.ExitCode -ne 0) {
189206 Write-Error "MSI installation failed with exit code $($installResult.ExitCode)"
190207 Get-Content $installLog | Write-Host
0 commit comments