@@ -25,36 +25,15 @@ jobs:
2525 shell : pwsh
2626
2727 - name : Install MetaTrader5
28- shell : pwsh
29- timeout-minutes : 5
3028 run : |
31- # Set installation parameters
32- $installDir = "$env:GITHUB_WORKSPACE\MT5Portable"
33- $installerPath = "$env:GITHUB_WORKSPACE\mt5setup.exe"
34-
35- # Run installer with extended timeout
36- $process = Start-Process $installerPath -ArgumentList @(
37- "/S",
38- "/portable=`"$installDir`"",
39- "/skipupdate"
40- ) -PassThru -NoNewWindow
41-
42- # Wait up to 4 minutes for installation
43- if (-not $process.WaitForExit(240000)) {
44- Write-Error "Installation timed out after 4 minutes"
45- exit 1
46- }
47-
48- # Verify successful installation
49- if (-not (Test-Path "$installDir\terminal64.exe")) {
50- Write-Error "Installation failed - terminal.exe missing"
51- # Add diagnostic info
52- Write-Host "Installation directory contents:"
53- Get-ChildItem $installDir -Recurse | Format-List
29+ $process = Start-Process -FilePath ".\mt5setup.exe" -ArgumentList "/auto", "/portable" -PassThru
30+ $process.WaitForExit(300000)
31+ if (-not $process.HasExited) {
32+ Write-Host "MT5 installer stuck, killing..."
33+ Stop-Process -Id $process.Id -Force
5434 exit 1
5535 }
56-
57- Write-Host "MT5 installed successfully to $installDir"
36+ shell : pwsh
5837
5938 - name : Launch MetaTrader5
6039 run : |
0 commit comments