Statistics: Posted by Yarvua — Tue Apr 30, 2024 10:08 pm — Replies 0 — Views 101
Statistics: Posted by Jimmy — Mon Apr 29, 2024 8:10 am — Replies 5 — Views 238
Statistics: Posted by Yarvua — Sun Apr 28, 2024 11:39 pm — Replies 2 — Views 147
Statistics: Posted by gri7614 — Sun Apr 28, 2024 7:56 pm — Replies 0 — Views 78
Statistics: Posted by ionone — Sun Apr 28, 2024 4:38 pm — Replies 0 — Views 97
Statistics: Posted by ionone — Sun Apr 28, 2024 12:11 am — Replies 0 — Views 117
Statistics: Posted by Yarvua — Sat Apr 27, 2024 7:29 pm — Replies 3 — Views 395
Statistics: Posted by Ogee — Sat Apr 27, 2024 4:22 pm — Replies 0 — Views 26
Code: Select all
################################################ Install modules if necessary for make this menu possible to run# Source at: https://github.com/dan-osull/PowerShell-Script-Menu-GuiWrite-Host "Install modules if necessary for make this menu possible to run"Install-Module PSScriptMenuGui -Scope CurrentUser -Force################################################ Hide or Minimize the powershell prompt after Winform Launch# Source at: https://stackoverflow.com/questions/15922745/hide-or-minimize-the-powershell-prompt-after-winform-launchWrite-Host "Hide or Minimize the powershell prompt after Winform Launch"$host.ui.RawUI.WindowTitle = "Hide or Minimize the powershell prompt after Winform Launch"$t = '[DllImport("user32.dll")] public static extern bool ShowWindow(int handle, int state);'add-type -name win -member $t -namespace native[native.win]::ShowWindow(([System.Diagnostics.Process]::GetCurrentProcess() | Get-Process).MainWindowHandle, 0)################################################ Enable silent mode on output only this scriptWrite-Host "Enable silent mode on output only this script"$host.ui.RawUI.WindowTitle = "Enable silent mode on output only this script"$ErrorActionPreference = 'SilentlyContinue'################################################ Hide the Windows Terminal console window with PowerShell# Source at: https://stackoverflow.com/questions/74968665/hide-the-windows-terminal-console-window-with-powershellWrite-Host "Hide the Windows Terminal console window with PowerShell"$host.ui.RawUI.WindowTitle = "Hide the Windows Terminal console window with PowerShell"Add-Type @" using System; using System.Runtime.InteropServices; public class UserWindows { [DllImport("user32.dll")] public static extern IntPtr GetWindowText(IntPtr hWnd, System.Text.StringBuilder text, int count);}"@$stringbuilder = New-Object System.Text.StringBuilder 256$windowcode = '[DllImport("user32.dll")] public static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);'$asyncwindow = Add-Type -MemberDefinition $windowcode -name Win32ShowWindowAsync -namespace Win32Functions -PassThru$hwnd = (Get-Process -PID $pid).MainWindowHandle$count = [UserWindows]::GetWindowText($hwnd, $stringbuilder, 256)"The name of this window is: $($stringbuilder.ToString())"if ($hwnd -ne [System.IntPtr]::Zero) { $hidden = $asyncwindow::ShowWindowAsync($hwnd, 0)}$run = $true$x=1while ($x -le 1) { [console]::beep(500,100) Start-Sleep 1 $x++ }################################################ Build requirements to run this scriptWrite-Host "Build requirements to run this script"$host.ui.RawUI.WindowTitle = "Build requirements to run this script"Write-Host "Resume what is does this specific task"Write-Host " Step 1: Build requirements to run this script -> Remove on previous files used"Write-Host " Step 2: Build requirements to run this script -> Build folder structure necessary"Write-Host " Step 3: Build requirements to run this script -> Declare windows variable"Write-Host " Step 4: Build requirements to run this script -> Create file for using on this menu"Write-Host " Step 5: Build requirements to run this script -> Create csv file for using on build menu"Write-Host " Step 6: Build requirements to run this script -> Create empty necessary additional files in batch to make all menu operational"Write-Host " Step 6.1: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on logs folder, delete older than 14 days"Write-Host " Step 6.2: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Common folder, delete content"Write-Host " Step 6.3: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Experts folder, delete content"Write-Host " Step 6.4: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Images folder, delete content"Write-Host " Step 6.5: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Files folder, delete content"Write-Host " Step 6.6: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Include folder, delete content"Write-Host " Step 6.7: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Indicators folder, delete content"Write-Host " Step 6.8: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Libraries folder, delete content"Write-Host " Step 6.9: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Logs folder, delete content"Write-Host " Step 6.10: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Presets folder, delete content"Write-Host " Step 6.12: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Scripts folder, delete content"Write-Host " Step 6.13: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Sounds folder, delete content"Write-Host " Step 6.14: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on history\mailbox folder, delete content"Write-Host " Step 6.15: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on history\deleted folder, delete content"Write-Host " Step 6.16: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on tester\caches folder, delete content"Write-Host " Step 6.17: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on tester\files folder, delete content"Write-Host " Step 6.18: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on tester\history folder, delete content"Write-Host " Step 6.19: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on tester\logs folder, delete content"Write-Host " Step 6.20: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on profiles\default folder, delete content"Write-Host " Step 6.21: Build requirements to run this script -> Create additional file in batch to make all menu operational :: Open all MetaTrader 4"Write-Host " Step 6.22: Build requirements to run this script -> Create additional file in batch to make all menu operational :: Run all previous step in OneClick"Write-Host " Step 6.23: Build requirements to run this script -> Create additional file in batch to make all menu operational :: Close this script"Write-Host " Step 7: Build requirements to run this script -> Create empty necessary additional files in powershell to make all menu operational"Write-Host " Step 7.1: Build requirements to run this script -> Create additional file in powershell to make all menu operational :: About on logs folder, delete older than 14 days and create new folder is necessary"Write-Host " Step 7.2: Build requirements to run this script -> Create additional file in powershell to make all menu operational :: About on MQL4\Common folder, delete content and create new folder is necessary"Write-Host " Step 7.3: Build requirements to run this script -> Create additional file in powershell to make all menu operational :: About on MQL4\Experts folder, delete content and create new folder is necessary"Write-Host " Step 7.4: Build requirements to run this script -> Create additional file in powershell to make all menu operational :: About on MQL4\Images folder, delete content and create new folder is necessary"Write-Host " Step 7.5: Build requirements to run this script -> Create additional file in powershell to make all menu operational :: About on MQL4\Files folder, delete content and create new folder is necessary"Write-Host " Step 7.6: Build requirements to run this script -> Create additional file in powershell to make all menu operational :: About on MQL4\Include folder, delete content and create new folder is necessary"Write-Host " Step 7.7: Build requirements to run this script -> Create additional file in powershell to make all menu operational :: About on MQL4\Indicators folder, delete content and create new folder is necessary"Write-Host " Step 7.8: Build requirements to run this script -> Create additional file in powershell to make all menu operational :: About on MQL4\Libraries folder, delete content and create new folder is necessary"Write-Host " Step 7.9: Build requirements to run this script -> Create additional file in powershell to make all menu operational :: About on MQL4\Logs folder, delete content and create new folder is necessary"Write-Host " Step 7.10: Build requirements to run this script -> Create additional file in powershell to make all menu operational :: About on MQL4\Presets folder, delete content and create new folder is necessary"Write-Host " Step 7.11: Build requirements to run this script -> Create additional file in powershell to make all menu operational :: About on MQL4\Scripts folder, delete content and create new folder is necessary"Write-Host " Step 7.12: Build requirements to run this script -> Create additional file in powershell to make all menu operational :: About on MQL4\Sounds folder, delete content and create new folder is necessary"Write-Host " Step 7.13: Build requirements to run this script -> Create additional file in powershell to make all menu operational :: About on history\mailbox folder, delete content and create new folder is necessary"Write-Host " Step 7.14: Build requirements to run this script -> Create additional file in powershell to make all menu operational :: About on history\deleted folder, delete content and create new folder is necessary"Write-Host " Step 7.15: Build requirements to run this script -> Create additional file in powershell to make all menu operational :: About on tester\caches folder, delete content and create new folder is necessary"Write-Host " Step 7.16: Build requirements to run this script -> Create additional file in powershell to make all menu operational :: About on tester\files folder, delete content and create new folder is necessary"Write-Host " Step 7.17: Build requirements to run this script -> Create additional file in powershell to make all menu operational :: About on tester\history folder, delete content and create new folder is necessary"Write-Host " Step 7.18: Build requirements to run this script -> Create additional file in powershell to make all menu operational :: About on tester\logs folder, delete content and create new folder is necessary"Write-Host " Step 7.19: Build requirements to run this script -> Create additional file in powershell to make all menu operational :: About on profiles\default folder, delete content and create new folder is necessary"Write-Host " Step 7.20: Build requirements to run this script -> Create additional file in powershell to make all menu operational :: Open all MetaTrader 4"Write-Host " Step 7.21: Build requirements to run this script -> Create additional file in powershell to make all menu operational :: Run all previous step in OneClick"Write-Host " Step 7.22: Build requirements to run this script -> Create additional file in powershell to make all menu operational :: Close this script"Write-Host " Step 8: Build requirements to run this script -> Create empty extra script for when the close this script when press x button"Write-Host " Step 9: Build requirements to run this script -> Create extra script for when the close this script when press x button"Write-Host " Step 10: Run main script PSScriptMenuGui all options"Write-Host " Step 11: Build requirements to run this script -> Clear windows variables generated previously"Write-Host " Step 12: Warning before running script"Write-Host " Step 13: Run menu"Write-Host " Step 14: Build requirements to run this script -> Run secondary script generated in hidden process"# Step 1: Build requirements to run this script -> Remove on previous files usedWrite-Host "Step 1: Build requirements to run this script -> Remove on previous files used"Remove-Item "C:\TEMP\CLEARMT4SETUP\Baseline" -Force -RecurseRemove-Item "C:\TEMP\CLEARMT4SETUP\BatchFile" -Force -RecurseRemove-Item "C:\TEMP\CLEARMT4SETUP\Extras" -Force -RecurseRemove-Item "C:\TEMP\CLEARMT4SETUP\Logs" -Force -RecurseRemove-Item "C:\TEMP\CLEARMT4SETUP\PowerShell" -Force -Recurse# Step 2: Build requirements to run this script -> Build folder structure necessaryWrite-Host "Step 2: Build requirements to run this script -> Build folder structure necessary"New-Item -ItemType Directory -Path "C:\TEMP\CLEARMT4SETUP\Baseline"New-Item -ItemType Directory -Path "C:\TEMP\CLEARMT4SETUP\BatchFile"New-Item -ItemType Directory -Path "C:\TEMP\CLEARMT4SETUP\Extras"New-Item -ItemType Directory -Path "C:\TEMP\CLEARMT4SETUP\Logs"New-Item -ItemType Directory -Path "C:\TEMP\CLEARMT4SETUP\PowerShell"# Step 3: Build requirements to run this script -> Declare windows variableWrite-Host "Step 3: Build requirements to run this script -> Declare windows variable"$env:CLEARMT4SETUPBaseline = 'C:\TEMP\CLEARMT4SETUP\Baseline'$env:CLEARMT4SETUPBatchFile = 'C:\TEMP\CLEARMT4SETUP\BatchFile'$env:CLEARMT4SETUPExtras = 'C:\TEMP\CLEARMT4SETUP\Extras'$env:CLEARMT4SETUPLogs = 'C:\TEMP\CLEARMT4SETUP\Logs'$env:CLEARMT4SETUPPowerShell = 'C:\TEMP\CLEARMT4SETUP\PowerShell'# Step 4: Build requirements to run this script -> Create empty file for using on this menuWrite-Host "Step 4: Build requirements to run this script -> Create empty file for using on this menu"New-Item "$env:CLEARMT4SETUPBaseline\BuildMENU.csv"# Step 5: Build requirements to run this script -> Create csv file for using on build menuWrite-Host "Step 5: Build requirements to run this script -> Create csv file for using on build menu"Add-Content "$env:CLEARMT4SETUPBaseline\BuildMENU.csv" 'Section,Method,Command,Arguments,Name,Description'Add-Content "$env:CLEARMT4SETUPBaseline\BuildMENU.csv" 'MetaTrader 4 - Clear history,cmd,C:\TEMP\CLEARMT4SETUP\BatchFile\04-01.cmd,,1,"About on logs folder, delete older than 14 days"'Add-Content "$env:CLEARMT4SETUPBaseline\BuildMENU.csv" 'MetaTrader 4 - Clear history,cmd,C:\TEMP\CLEARMT4SETUP\BatchFile\04-02.cmd,,2,"About on MQL4\Common folder, delete content, and next create folder is necessary"'Add-Content "$env:CLEARMT4SETUPBaseline\BuildMENU.csv" 'MetaTrader 4 - Clear history,cmd,C:\TEMP\CLEARMT4SETUP\BatchFile\04-03.cmd,,3,"About on MQL4\Experts folder, delete content, and next create folder is necessary"'Add-Content "$env:CLEARMT4SETUPBaseline\BuildMENU.csv" 'MetaTrader 4 - Clear history,cmd,C:\TEMP\CLEARMT4SETUP\BatchFile\04-04.cmd,,4,"About on MQL4\Images folder, delete content, and next create folder is necessary"'Add-Content "$env:CLEARMT4SETUPBaseline\BuildMENU.csv" 'MetaTrader 4 - Clear history,cmd,C:\TEMP\CLEARMT4SETUP\BatchFile\04-05.cmd,,5,"About on MQL4\Files folder, delete content, and next create folder is necessary"'Add-Content "$env:CLEARMT4SETUPBaseline\BuildMENU.csv" 'MetaTrader 4 - Clear history,cmd,C:\TEMP\CLEARMT4SETUP\BatchFile\04-06.cmd,,6,"About on MQL4\Include folder, delete content, and next create folder is necessary"'Add-Content "$env:CLEARMT4SETUPBaseline\BuildMENU.csv" 'MetaTrader 4 - Clear history,cmd,C:\TEMP\CLEARMT4SETUP\BatchFile\04-07.cmd,,7,"About on MQL4\Indicators folder, delete content, and next create folder is necessary"'Add-Content "$env:CLEARMT4SETUPBaseline\BuildMENU.csv" 'MetaTrader 4 - Clear history,cmd,C:\TEMP\CLEARMT4SETUP\BatchFile\04-08.cmd,,8,"About on MQL4\Libraries folder, delete content, and next create folder is necessary"'Add-Content "$env:CLEARMT4SETUPBaseline\BuildMENU.csv" 'MetaTrader 4 - Clear history,cmd,C:\TEMP\CLEARMT4SETUP\BatchFile\04-09.cmd,,9,"About on MQL4\Logs folder, delete content, and next create folder is necessary"'Add-Content "$env:CLEARMT4SETUPBaseline\BuildMENU.csv" 'MetaTrader 4 - Clear history,cmd,C:\TEMP\CLEARMT4SETUP\BatchFile\04-10.cmd,,10,"About on MQL4\Presets folder, delete content, and next create folder is necessary"'Add-Content "$env:CLEARMT4SETUPBaseline\BuildMENU.csv" 'MetaTrader 4 - Clear history,cmd,C:\TEMP\CLEARMT4SETUP\BatchFile\04-11.cmd,,11,"About on MQL4\Scripts folder, delete content, and next create folder is necessary"'Add-Content "$env:CLEARMT4SETUPBaseline\BuildMENU.csv" 'MetaTrader 4 - Clear history,cmd,C:\TEMP\CLEARMT4SETUP\BatchFile\04-12.cmd,,12,"About on MQL4\Sounds folder, delete content, and next create folder is necessary"'Add-Content "$env:CLEARMT4SETUPBaseline\BuildMENU.csv" 'MetaTrader 4 - Clear history,cmd,C:\TEMP\CLEARMT4SETUP\BatchFile\04-13.cmd,,13,"About on history\mailbox folder, delete content, and next create folder is necessary"'Add-Content "$env:CLEARMT4SETUPBaseline\BuildMENU.csv" 'MetaTrader 4 - Clear history,cmd,C:\TEMP\CLEARMT4SETUP\BatchFile\04-14.cmd,,14,"About on history\deleted folder, delete content, and next create folder is necessary"'Add-Content "$env:CLEARMT4SETUPBaseline\BuildMENU.csv" 'MetaTrader 4 - Clear history,cmd,C:\TEMP\CLEARMT4SETUP\BatchFile\04-15.cmd,,15,"About on tester\caches folder, delete content, and next create folder is necessary"'Add-Content "$env:CLEARMT4SETUPBaseline\BuildMENU.csv" 'MetaTrader 4 - Clear history,cmd,C:\TEMP\CLEARMT4SETUP\BatchFile\04-16.cmd,,16,"About on tester\files folder, delete content, and next create folder is necessary"'Add-Content "$env:CLEARMT4SETUPBaseline\BuildMENU.csv" 'MetaTrader 4 - Clear history,cmd,C:\TEMP\CLEARMT4SETUP\BatchFile\04-17.cmd,,17,"About on tester\history folder, delete content, and next create folder is necessary"'Add-Content "$env:CLEARMT4SETUPBaseline\BuildMENU.csv" 'MetaTrader 4 - Clear history,cmd,C:\TEMP\CLEARMT4SETUP\BatchFile\04-18.cmd,,18,"About on tester\logs folder, delete content, and next create folder is necessary"'Add-Content "$env:CLEARMT4SETUPBaseline\BuildMENU.csv" 'MetaTrader 4 - Clear history,cmd,C:\TEMP\CLEARMT4SETUP\BatchFile\04-19.cmd,,19,"About on profiles\default folder, delete content, and next create folder is necessary"'Add-Content "$env:CLEARMT4SETUPBaseline\BuildMENU.csv" 'MetaTrader 4 - Clear history,cmd,C:\TEMP\CLEARMT4SETUP\BatchFile\04-20.cmd,,20,Open all MetaTrader 4'Add-Content "$env:CLEARMT4SETUPBaseline\BuildMENU.csv" 'MetaTrader 4 - Clear history,cmd,C:\TEMP\CLEARMT4SETUP\BatchFile\04-21.cmd,,21,Run all previous step in OneClick'Add-Content "$env:CLEARMT4SETUPBaseline\BuildMENU.csv" 'MetaTrader 4 - Clear history,cmd,C:\TEMP\CLEARMT4SETUP\BatchFile\04-22.cmd,,22,Close this script'# Step 6: Build requirements to run this script -> Create empty necessary additional files in batch to make all menu operationalWrite-Host "Step 6: Build requirements to run this script -> Create empty necessary additional files in batch to make all menu operational"New-Item $env:CLEARMT4SETUPBatchFile\04-01.cmdNew-Item $env:CLEARMT4SETUPBatchFile\04-01.cmdNew-Item $env:CLEARMT4SETUPBatchFile\04-02.cmdNew-Item $env:CLEARMT4SETUPBatchFile\04-03.cmdNew-Item $env:CLEARMT4SETUPBatchFile\04-04.cmdNew-Item $env:CLEARMT4SETUPBatchFile\04-05.cmdNew-Item $env:CLEARMT4SETUPBatchFile\04-06.cmdNew-Item $env:CLEARMT4SETUPBatchFile\04-07.cmdNew-Item $env:CLEARMT4SETUPBatchFile\04-08.cmdNew-Item $env:CLEARMT4SETUPBatchFile\04-10.cmdNew-Item $env:CLEARMT4SETUPBatchFile\04-11.cmdNew-Item $env:CLEARMT4SETUPBatchFile\04-12.cmdNew-Item $env:CLEARMT4SETUPBatchFile\04-13.cmdNew-Item $env:CLEARMT4SETUPBatchFile\04-14.cmdNew-Item $env:CLEARMT4SETUPBatchFile\04-15.cmdNew-Item $env:CLEARMT4SETUPBatchFile\04-16.cmdNew-Item $env:CLEARMT4SETUPBatchFile\04-17.cmdNew-Item $env:CLEARMT4SETUPBatchFile\04-18.cmdNew-Item $env:CLEARMT4SETUPBatchFile\04-18.cmdNew-Item $env:CLEARMT4SETUPBatchFile\04-19.cmdNew-Item $env:CLEARMT4SETUPBatchFile\04-20.cmdNew-Item $env:CLEARMT4SETUPBatchFile\04-21.cmdNew-Item $env:CLEARMT4SETUPBatchFile\04-22.cmd# Step 6.1: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on logs folder, delete older than 14 daysWrite-Host "Step 6.1: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on logs folder, delete older than 14 days"Add-Content "$env:CLEARMT4SETUPBatchFile\04-01.cmd" ':: Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-01.cmd" 'echo Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-01.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-01.cmd" 'cd "C:\TEMP\CLEARMT4SETUP\PowerShell"'Add-Content "$env:CLEARMT4SETUPBatchFile\04-01.cmd" 'powershell.exe -file "07-01.ps1" -Verb RunAs'Add-Content "$env:CLEARMT4SETUPBatchFile\04-01.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-01.cmd" 'exit 0'Add-Content "$env:CLEARMT4SETUPBatchFile\04-01.cmd" ''# Step 6.2: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Common folder, delete contentWrite-Host "Step 6.2: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Common folder, delete content"Add-Content "$env:CLEARMT4SETUPBatchFile\04-02.cmd" ':: Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-02.cmd" 'echo Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-02.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-02.cmd" 'cd "C:\TEMP\CLEARMT4SETUP\PowerShell"'Add-Content "$env:CLEARMT4SETUPBatchFile\04-02.cmd" 'powershell.exe -file "07-02.ps1" -Verb RunAs'Add-Content "$env:CLEARMT4SETUPBatchFile\04-02.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-02.cmd" 'exit 0'Add-Content "$env:CLEARMT4SETUPBatchFile\04-02.cmd" ''# Step 6.3: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Experts folder, delete contentWrite-Host "Step 6.3: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Experts folder, delete content"Add-Content "$env:CLEARMT4SETUPBatchFile\04-03.cmd" ':: Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-03.cmd" 'echo Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-03.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-03.cmd" 'cd "C:\TEMP\CLEARMT4SETUP\PowerShell"'Add-Content "$env:CLEARMT4SETUPBatchFile\04-03.cmd" 'powershell.exe -file "07-03.ps1" -Verb RunAs'Add-Content "$env:CLEARMT4SETUPBatchFile\04-03.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-03.cmd" 'exit 0'Add-Content "$env:CLEARMT4SETUPBatchFile\04-03.cmd" ''# Step 6.4: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Images folder, delete contentWrite-Host "Step 6.4: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Images folder, delete content"Add-Content "$env:CLEARMT4SETUPBatchFile\04-04.cmd" ':: Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-04.cmd" 'echo Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-04.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-04.cmd" 'cd "C:\TEMP\CLEARMT4SETUP\PowerShell"'Add-Content "$env:CLEARMT4SETUPBatchFile\04-04.cmd" 'powershell.exe -file "07-04.ps1" -Verb RunAs'Add-Content "$env:CLEARMT4SETUPBatchFile\04-04.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-04.cmd" 'exit 0'Add-Content "$env:CLEARMT4SETUPBatchFile\04-04.cmd" ''# Step 6.5: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Files folder, delete contentWrite-Host "Step 6.5: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Files folder, delete content"Add-Content "$env:CLEARMT4SETUPBatchFile\04-05.cmd" ':: Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-05.cmd" 'echo Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-05.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-05.cmd" 'cd "C:\TEMP\CLEARMT4SETUP\PowerShell"'Add-Content "$env:CLEARMT4SETUPBatchFile\04-05.cmd" 'powershell.exe -file "07-05.ps1" -Verb RunAs'Add-Content "$env:CLEARMT4SETUPBatchFile\04-05.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-05.cmd" 'exit 0'Add-Content "$env:CLEARMT4SETUPBatchFile\04-05.cmd" ''# Step 6.6: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Include folder, delete contentWrite-Host "Step 6.6: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Include folder, delete content"Add-Content "$env:CLEARMT4SETUPBatchFile\04-06.cmd" ':: Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-06.cmd" 'echo Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-06.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-06.cmd" 'cd "C:\TEMP\CLEARMT4SETUP\PowerShell"'Add-Content "$env:CLEARMT4SETUPBatchFile\04-06.cmd" 'powershell.exe -file "07-06.ps1" -Verb RunAs'Add-Content "$env:CLEARMT4SETUPBatchFile\04-06.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-06.cmd" 'exit 0'Add-Content "$env:CLEARMT4SETUPBatchFile\04-06.cmd" ''# Step 6.7: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Indicators folder, delete contentWrite-Host "Step 6.7: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Indicators folder, delete content"Add-Content "$env:CLEARMT4SETUPBatchFile\04-07.cmd" ':: Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-07.cmd" 'echo Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-07.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-07.cmd" 'cd "C:\TEMP\CLEARMT4SETUP\PowerShell"'Add-Content "$env:CLEARMT4SETUPBatchFile\04-07.cmd" 'powershell.exe -file "07-07.ps1" -Verb RunAs'Add-Content "$env:CLEARMT4SETUPBatchFile\04-07.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-07.cmd" 'exit 0'Add-Content "$env:CLEARMT4SETUPBatchFile\04-07.cmd" ''# Step 6.8: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Libraries folder, delete contentWrite-Host "Step 6.8: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Libraries folder, delete content"Add-Content "$env:CLEARMT4SETUPBatchFile\04-08.cmd" ':: Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-08.cmd" 'echo Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-08.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-08.cmd" 'cd "C:\TEMP\CLEARMT4SETUP\PowerShell"'Add-Content "$env:CLEARMT4SETUPBatchFile\04-08.cmd" 'powershell.exe -file "07-08.ps1" -Verb RunAs'Add-Content "$env:CLEARMT4SETUPBatchFile\04-08.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-08.cmd" 'exit 0'Add-Content "$env:CLEARMT4SETUPBatchFile\04-08.cmd" ''# Step 6.9: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Logs folder, delete contentWrite-Host "Step 6.9: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Logs folder, delete content"Add-Content "$env:CLEARMT4SETUPBatchFile\04-09.cmd" ':: Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-09.cmd" 'echo Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-09.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-09.cmd" 'cd "C:\TEMP\CLEARMT4SETUP\PowerShell"'Add-Content "$env:CLEARMT4SETUPBatchFile\04-09.cmd" 'powershell.exe -file "07-09.ps1" -Verb RunAs'Add-Content "$env:CLEARMT4SETUPBatchFile\04-09.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-09.cmd" 'exit 0'Add-Content "$env:CLEARMT4SETUPBatchFile\04-09.cmd" ''# Step 6.10: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Presets folder, delete contentWrite-Host "Step 6.10: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Presets folder, delete content"Add-Content "$env:CLEARMT4SETUPBatchFile\04-10.cmd" ':: Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-10.cmd" 'echo Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-10.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-10.cmd" 'cd "C:\TEMP\CLEARMT4SETUP\PowerShell"'Add-Content "$env:CLEARMT4SETUPBatchFile\04-10.cmd" 'powershell.exe -file "07-10.ps1" -Verb RunAs'Add-Content "$env:CLEARMT4SETUPBatchFile\04-10.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-10.cmd" 'exit 0'Add-Content "$env:CLEARMT4SETUPBatchFile\04-10.cmd" ''# Step 6.11: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Scripts folder, delete contentWrite-Host "Step 6.11: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Scripts folder, delete content"Add-Content "$env:CLEARMT4SETUPBatchFile\04-11.cmd" ':: Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-11.cmd" 'echo Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-11.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-11.cmd" 'cd "C:\TEMP\CLEARMT4SETUP\PowerShell"'Add-Content "$env:CLEARMT4SETUPBatchFile\04-11.cmd" 'powershell.exe -file "07-11.ps1" -Verb RunAs'Add-Content "$env:CLEARMT4SETUPBatchFile\04-11.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-11.cmd" 'exit 0'Add-Content "$env:CLEARMT4SETUPBatchFile\04-11.cmd" ''# Step 6.12: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Sounds folder, delete contentWrite-Host "Step 6.12: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Sounds folder, delete content"Add-Content "$env:CLEARMT4SETUPBatchFile\04-12.cmd" ':: Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-12.cmd" 'echo Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-12.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-12.cmd" 'cd "C:\TEMP\CLEARMT4SETUP\PowerShell"'Add-Content "$env:CLEARMT4SETUPBatchFile\04-12.cmd" 'powershell.exe -file "07-12.ps1" -Verb RunAs'Add-Content "$env:CLEARMT4SETUPBatchFile\04-12.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-12.cmd" 'exit 0'Add-Content "$env:CLEARMT4SETUPBatchFile\04-12.cmd" ''# Step 6.13: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on history\mailbox folder, delete contentWrite-Host "Step 6.13: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on history\mailbox folder, delete content"Add-Content "$env:CLEARMT4SETUPBatchFile\04-13.cmd" ':: Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-13.cmd" 'echo Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-13.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-13.cmd" 'cd "C:\TEMP\CLEARMT4SETUP\PowerShell"'Add-Content "$env:CLEARMT4SETUPBatchFile\04-13.cmd" 'powershell.exe -file "07-13.ps1" -Verb RunAs'Add-Content "$env:CLEARMT4SETUPBatchFile\04-13.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-13.cmd" 'exit 0'Add-Content "$env:CLEARMT4SETUPBatchFile\04-13.cmd" ''# Step 6.14: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on history\deleted folder, delete contentWrite-Host "Step 6.14: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on history\deleted folder, delete content"Add-Content "$env:CLEARMT4SETUPBatchFile\04-14.cmd" ':: Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-14.cmd" 'echo Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-14.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-14.cmd" 'cd "C:\TEMP\CLEARMT4SETUP\PowerShell"'Add-Content "$env:CLEARMT4SETUPBatchFile\04-14.cmd" 'powershell.exe -file "07-14.ps1" -Verb RunAs'Add-Content "$env:CLEARMT4SETUPBatchFile\04-14.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-14.cmd" 'exit 0'Add-Content "$env:CLEARMT4SETUPBatchFile\04-14.cmd" ''# Step 6.15: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on tester\caches folder, delete contentWrite-Host "Step 6.15: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on tester\caches folder, delete content"Add-Content "$env:CLEARMT4SETUPBatchFile\04-15.cmd" ':: Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-15.cmd" 'echo Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-15.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-15.cmd" 'cd "C:\TEMP\CLEARMT4SETUP\PowerShell"'Add-Content "$env:CLEARMT4SETUPBatchFile\04-15.cmd" 'powershell.exe -file "07-15.ps1" -Verb RunAs'Add-Content "$env:CLEARMT4SETUPBatchFile\04-15.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-15.cmd" 'exit 0'Add-Content "$env:CLEARMT4SETUPBatchFile\04-15.cmd" ''# Step 6.16: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on tester\files folder, delete contentWrite-Host "Step 6.16: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on tester\files folder, delete content"Add-Content "$env:CLEARMT4SETUPBatchFile\04-16.cmd" ':: Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-16.cmd" 'echo Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-16.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-16.cmd" 'cd "C:\TEMP\CLEARMT4SETUP\PowerShell"'Add-Content "$env:CLEARMT4SETUPBatchFile\04-16.cmd" 'powershell.exe -file "07-16.ps1" -Verb RunAs'Add-Content "$env:CLEARMT4SETUPBatchFile\04-16.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-16.cmd" 'exit 0'Add-Content "$env:CLEARMT4SETUPBatchFile\04-16.cmd" ''# Step 6.17: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on tester\history folder, delete contentWrite-Host "Step 6.17: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on tester\history folder, delete content"Add-Content "$env:CLEARMT4SETUPBatchFile\04-17.cmd" ':: Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-17.cmd" 'echo Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-17.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-17.cmd" 'cd "C:\TEMP\CLEARMT4SETUP\PowerShell"'Add-Content "$env:CLEARMT4SETUPBatchFile\04-17.cmd" 'powershell.exe -file "07-17.ps1" -Verb RunAs'Add-Content "$env:CLEARMT4SETUPBatchFile\04-17.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-17.cmd" 'exit 0'Add-Content "$env:CLEARMT4SETUPBatchFile\04-17.cmd" ''# Step 6.18: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on tester\logs folder, delete contentWrite-Host "Step 6.18: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on tester\logs folder, delete content"Add-Content "$env:CLEARMT4SETUPBatchFile\04-18.cmd" ':: Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-18.cmd" 'echo Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-18.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-18.cmd" 'cd "C:\TEMP\CLEARMT4SETUP\PowerShell"'Add-Content "$env:CLEARMT4SETUPBatchFile\04-18.cmd" 'powershell.exe -file "07-18.ps1" -Verb RunAs'Add-Content "$env:CLEARMT4SETUPBatchFile\04-18.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-18.cmd" 'exit 0'Add-Content "$env:CLEARMT4SETUPBatchFile\04-18.cmd" ''# Step 6.19: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on profiles\default folder, delete contentWrite-Host "Step 6.19: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on profiles\default folder, delete content"Add-Content "$env:CLEARMT4SETUPBatchFile\04-19.cmd" ':: Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-19.cmd" 'echo Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-19.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-19.cmd" 'cd "C:\TEMP\CLEARMT4SETUP\PowerShell"'Add-Content "$env:CLEARMT4SETUPBatchFile\04-19.cmd" 'powershell.exe -file "07-19.ps1" -Verb RunAs'Add-Content "$env:CLEARMT4SETUPBatchFile\04-19.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-19.cmd" 'exit 0'Add-Content "$env:CLEARMT4SETUPBatchFile\04-19.cmd" ''# Step 6.20: Build requirements to run this script -> Create additional file in batch to make all menu operational :: Open all MetaTrader 4Write-Host "Step 6.20: Build requirements to run this script -> Create additional file in batch to make all menu operational :: Open all MetaTrader 4"Add-Content "$env:CLEARMT4SETUPBatchFile\04-20.cmd" ':: Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-20.cmd" 'echo Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-20.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-20.cmd" 'cd "C:\TEMP\CLEARMT4SETUP\PowerShell"'Add-Content "$env:CLEARMT4SETUPBatchFile\04-20.cmd" 'powershell.exe -file "07-20.ps1" -Verb RunAs'Add-Content "$env:CLEARMT4SETUPBatchFile\04-20.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-20.cmd" 'exit 0'Add-Content "$env:CLEARMT4SETUPBatchFile\04-20.cmd" ''# Step 6.21: Build requirements to run this script -> Create additional file in batch to make all menu operational :: Run all previous step in OneClickWrite-Host "Step 6.21: Build requirements to run this script -> Create additional file in batch to make all menu operational :: Run all previous step in OneClick"Add-Content "$env:CLEARMT4SETUPBatchFile\04-21.cmd" ':: Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-21.cmd" 'echo Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-21.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-21.cmd" 'cd "C:\TEMP\CLEARMT4SETUP\PowerShell"'Add-Content "$env:CLEARMT4SETUPBatchFile\04-21.cmd" 'powershell.exe -file "07-21.ps1" -Verb RunAs'Add-Content "$env:CLEARMT4SETUPBatchFile\04-21.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-21.cmd" 'exit 0'Add-Content "$env:CLEARMT4SETUPBatchFile\04-21.cmd" ''# Step 6.22: Build requirements to run this script -> Create additional file in batch to make all menu operational :: Close this scriptWrite-Host "Step 6.22: Build requirements to run this script -> Create additional file in batch to make all menu operational :: Close this script"Add-Content "$env:CLEARMT4SETUPBatchFile\04-22.cmd" ':: Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-22.cmd" 'echo Go to specific location to run powershell'Add-Content "$env:CLEARMT4SETUPBatchFile\04-22.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-22.cmd" 'cd "C:\TEMP\CLEARMT4SETUP\PowerShell"'Add-Content "$env:CLEARMT4SETUPBatchFile\04-22.cmd" 'powershell.exe -file "07-22.ps1" -Verb RunAs'Add-Content "$env:CLEARMT4SETUPBatchFile\04-22.cmd" ''Add-Content "$env:CLEARMT4SETUPBatchFile\04-22.cmd" 'exit 0'Add-Content "$env:CLEARMT4SETUPBatchFile\04-22.cmd" ''# Step 7: Build requirements to run this script -> Create additional file in batch to make all menu operationalWrite-Host "Step 7: Build requirements to run this script -> Create additional file in batch to make all menu operational"New-Item $env:CLEARMT4SETUPPowerShell\07-01.ps1New-Item $env:CLEARMT4SETUPPowerShell\07-01.ps1New-Item $env:CLEARMT4SETUPPowerShell\07-02.ps1New-Item $env:CLEARMT4SETUPPowerShell\07-03.ps1New-Item $env:CLEARMT4SETUPPowerShell\07-04.ps1New-Item $env:CLEARMT4SETUPPowerShell\07-05.ps1New-Item $env:CLEARMT4SETUPPowerShell\07-06.ps1New-Item $env:CLEARMT4SETUPPowerShell\07-07.ps1New-Item $env:CLEARMT4SETUPPowerShell\07-08.ps1New-Item $env:CLEARMT4SETUPPowerShell\07-09.ps1New-Item $env:CLEARMT4SETUPPowerShell\07-10.ps1New-Item $env:CLEARMT4SETUPPowerShell\07-11.ps1New-Item $env:CLEARMT4SETUPPowerShell\07-12.ps1New-Item $env:CLEARMT4SETUPPowerShell\07-13.ps1New-Item $env:CLEARMT4SETUPPowerShell\07-14.ps1New-Item $env:CLEARMT4SETUPPowerShell\07-15.ps1New-Item $env:CLEARMT4SETUPPowerShell\07-16.ps1New-Item $env:CLEARMT4SETUPPowerShell\07-17.ps1New-Item $env:CLEARMT4SETUPPowerShell\07-18.ps1New-Item $env:CLEARMT4SETUPPowerShell\07-19.ps1New-Item $env:CLEARMT4SETUPPowerShell\07-20.ps1New-Item $env:CLEARMT4SETUPPowerShell\07-21.ps1New-Item $env:CLEARMT4SETUPPowerShell\07-22.ps1# Step 7.1: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on logs folder, delete older than 14 days and create new folder is necessaryWrite-Host "Step 7.1: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on logs folder, delete older than 14 days and create new folder is necessary"Add-Content "$env:CLEARMT4SETUPPowerShell\07-01.ps1" '# About on logs folder, delete older than 14 days'Add-Content "$env:CLEARMT4SETUPPowerShell\07-01.ps1" 'Write-Host "About on logs folder, delete older than 14 days"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-01.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\logs -Recurse | Where-Object {$_.Lastwritetime -lt (Get-Date).adddays(-13)} | Remove-Item'Add-Content "$env:CLEARMT4SETUPPowerShell\07-01.ps1" ''# Step 7.2: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Common folder, delete content and create new folder is necessaryWrite-Host "Step 7.2: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Common folder, delete content and create new folder is necessary"Add-Content "$env:CLEARMT4SETUPPowerShell\07-02.ps1" '# About on MQL4\Common folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-02.ps1" 'Write-Host "About on MQL4\Common folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-02.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\Common | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-02.ps1" 'Remove-Item $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\Common -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-02.ps1" ''# Step 7.3: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Experts folder, delete content and create new folder is necessaryWrite-Host "Step 7.3: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Experts folder, delete content and create new folder is necessary"Add-Content "$env:CLEARMT4SETUPPowerShell\07-03.ps1" '# About on MQL4\Experts folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-03.ps1" 'Write-Host "About on MQL4\Experts folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-03.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Experts | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-03.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-03.ps1" '# About on MQL4\Experts folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-03.ps1" 'Write-Host "About on MQL4\Experts folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-03.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4 -Name Experts'Add-Content "$env:CLEARMT4SETUPPowerShell\07-03.ps1" ''# Step 7.4: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Images folder, delete content and create new folder is necessaryWrite-Host "Step 7.4: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Images folder, delete content and create new folder is necessary"Add-Content "$env:CLEARMT4SETUPPowerShell\07-04.ps1" '# About on MQL4\Images folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-04.ps1" 'Write-Host "About on MQL4\Images folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-04.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Images | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-04.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-04.ps1" '# About on MQL4\Images folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-04.ps1" 'Write-Host "About on MQL4\Images folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-04.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4 -Name Images'Add-Content "$env:CLEARMT4SETUPPowerShell\07-04.ps1" ''# Step 7.5: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Files folder, delete content and create new folder is necessaryWrite-Host "Step 7.5: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Files folder, delete content and create new folder is necessary"Add-Content "$env:CLEARMT4SETUPPowerShell\07-05.ps1" '# About on MQL4\Files folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-05.ps1" 'Write-Host "About on MQL4\Files folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-05.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Files | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-05.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-05.ps1" '# About on MQL4\Files folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-05.ps1" 'Write-Host "About on MQL4\Files folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-05.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4 -Name Files'Add-Content "$env:CLEARMT4SETUPPowerShell\07-05.ps1" ''# Step 7.6: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Include folder, delete content and create new folder is necessaryWrite-Host "Step 7.6: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Include folder, delete content and create new folder is necessary"Add-Content "$env:CLEARMT4SETUPPowerShell\07-06.ps1" '# About on MQL4\Include folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-06.ps1" 'Write-Host "About on MQL4\Include folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-06.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include -Recurse | Where-Object {(($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\Arrays*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\Canvas*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\ChartObjects*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\Charts*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\Controls*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\Files*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\Indicators*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\Strings*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\Tools*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\MovingAverages.mqh*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\Object.mqh*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\stderror.mqh*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\stdlib.mqh*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\StdLibErr.mqh*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\WinUser32.mqh*'))} | Remove-Item -Recurse'Add-Content "$env:CLEARMT4SETUPPowerShell\07-06.ps1" ''# Step 7.7: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Indicators folder, delete content and create new folder is necessaryWrite-Host "Step 7.7: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Indicators folder, delete content and create new folder is necessary"Add-Content "$env:CLEARMT4SETUPPowerShell\07-07.ps1" '# About on MQL4\Indicators folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-07.ps1" 'Write-Host "About on MQL4\Indicators folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-07.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Indicators | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-07.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-07.ps1" '# About on MQL4\Indicators folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-07.ps1" 'Write-Host "About on MQL4\Indicators folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-07.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4 -Name Indicators'Add-Content "$env:CLEARMT4SETUPPowerShell\07-07.ps1" ''# Step 7.8: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Libraries folder, delete content and create new folder is necessaryWrite-Host "Step 7.8: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Libraries folder, delete content and create new folder is necessary"Add-Content "$env:CLEARMT4SETUPPowerShell\07-08.ps1" '# About on MQL4\Libraries folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-08.ps1" 'Write-Host "About on MQL4\Libraries folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-08.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Libraries -Recurse | Where-Object {(($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Libraries\stdlib.ex4') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Libraries\stdlib.mq4*'))} | Remove-Item -Recurse'Add-Content "$env:CLEARMT4SETUPPowerShell\07-08.ps1" ''# Step 7.9: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Logs folder, delete content and create new folder is necessaryWrite-Host "Step 7.9: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Logs folder, delete content and create new folder is necessary"Add-Content "$env:CLEARMT4SETUPPowerShell\07-09.ps1" '# About on MQL4\Logs folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-09.ps1" 'Write-Host "About on MQL4\Logs folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-09.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Logs -Recurse | Where-Object {$_.Lastwritetime -lt (Get-Date).adddays(-13)} | Remove-Item'Add-Content "$env:CLEARMT4SETUPPowerShell\07-09.ps1" ''# Step 7.10: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Presets folder, delete content and create new folder is necessaryWrite-Host "Step 7.10: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Presets folder, delete content and create new folder is necessary"Add-Content "$env:CLEARMT4SETUPPowerShell\07-10.ps1" '# About on MQL4\Presets folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-10.ps1" 'Write-Host "About on MQL4\Presets folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-10.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Presets | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-10.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-10.ps1" '# About on MQL4\Presets folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-10.ps1" 'Write-Host "About on MQL4\Presets folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-10.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4 -Name Presets'Add-Content "$env:CLEARMT4SETUPPowerShell\07-10.ps1" ''# Step 7.11: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Scripts folder, delete content and create new folder is necessaryWrite-Host "Step 7.11: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Scripts folder, delete content and create new folder is necessary"Add-Content "$env:CLEARMT4SETUPPowerShell\07-11.ps1" '# About on MQL4\Scripts folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-11.ps1" 'Write-Host "About on MQL4\Scripts folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-11.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Scripts | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-11.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-11.ps1" '# About on MQL4\Scripts folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-11.ps1" 'Write-Host "About on MQL4\Scripts folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-11.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4 -Name Scripts'Add-Content "$env:CLEARMT4SETUPPowerShell\07-11.ps1" ''# Step 7.12: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Sounds folder, delete content and create new folder is necessaryWrite-Host "Step 7.12: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on MQL4\Sounds folder, delete content and create new folder is necessary"Add-Content "$env:CLEARMT4SETUPPowerShell\07-12.ps1" '# About on MQL4\Sounds folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-12.ps1" 'Write-Host "About on MQL4\Sounds folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-12.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Sounds | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-12.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-12.ps1" '# About on MQL4\Sounds folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-12.ps1" 'Write-Host "About on MQL4\Sounds folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-12.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4 -Name Sounds'Add-Content "$env:CLEARMT4SETUPPowerShell\07-12.ps1" ''# Step 7.13: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on history\mailbox folder, delete content and create new folder is necessaryWrite-Host "Step 7.13: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on history\mailbox folder, delete content and create new folder is necessary"Add-Content "$env:CLEARMT4SETUPPowerShell\07-13.ps1" '# About on history\mailbox folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-13.ps1" 'Write-Host "About on history\mailbox folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-13.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\history\mailbox | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-13.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-13.ps1" '# About on history\mailbox folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-13.ps1" 'Write-Host "About on history\mailbox folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-13.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\history -Name mailbox'Add-Content "$env:CLEARMT4SETUPPowerShell\07-13.ps1" ''# Step 7.14: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on history\deleted folder, delete content and create new folder is necessaryWrite-Host "Step 7.14: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on history\deleted folder, delete content and create new folder is necessary"Add-Content "$env:CLEARMT4SETUPPowerShell\07-14.ps1" '# About on history\deleted folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-14.ps1" 'Write-Host "About on history\deleted folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-14.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\history\deleted | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-14.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-14.ps1" '# About on history\deleted folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-14.ps1" 'Write-Host "About on history\deleted folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-14.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\history -Name deleted'Add-Content "$env:CLEARMT4SETUPPowerShell\07-14.ps1" ''# Step 7.15: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on tester\caches folder, delete content and create new folder is necessaryWrite-Host "Step 7.15: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on tester\caches folder, delete content and create new folder is necessary"Add-Content "$env:CLEARMT4SETUPPowerShell\07-15.ps1" '# About on tester\caches folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-15.ps1" 'Write-Host "About on tester\caches folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-15.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\tester\caches | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-15.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-15.ps1" '# About on tester\caches folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-15.ps1" 'Write-Host "About on tester\caches folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-15.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\tester -Name caches'Add-Content "$env:CLEARMT4SETUPPowerShell\07-15.ps1" ''# Step 7.16: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on tester\files folder, delete content and create new folder is necessaryWrite-Host "Step 7.16: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on tester\files folder, delete content and create new folder is necessary"Add-Content "$env:CLEARMT4SETUPPowerShell\07-16.ps1" '# About on tester\files folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-16.ps1" 'Write-Host "About on tester\files folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-16.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\tester\files | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-16.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-16.ps1" '# About on tester\files folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-16.ps1" 'Write-Host "About on tester\files folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-16.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\tester -Name files'Add-Content "$env:CLEARMT4SETUPPowerShell\07-16.ps1" ''# Step 7.17: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on tester\history folder, delete content and create new folder is necessaryWrite-Host "Step 7.17: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on tester\history folder, delete content and create new folder is necessary"Add-Content "$env:CLEARMT4SETUPPowerShell\07-17.ps1" '# About on tester\history folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-17.ps1" 'Write-Host "About on tester\history folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-17.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\tester\history | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-17.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-17.ps1" '# About on tester\history folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-17.ps1" 'Write-Host "About on tester\history folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-17.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\tester -Name history'Add-Content "$env:CLEARMT4SETUPPowerShell\07-17.ps1" ''# Step 7.18: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on tester\logs folder, delete content and create new folder is necessaryWrite-Host "Step 7.18: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on tester\logs folder, delete content and create new folder is necessary"Add-Content "$env:CLEARMT4SETUPPowerShell\07-18.ps1" '# About on tester\logs folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-18.ps1" 'Write-Host "About on tester\logs folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-18.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\tester\logs | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-18.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-18.ps1" '# About on tester\logs folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-18.ps1" 'Write-Host "About on tester\logs folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-18.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\tester -Name logs'Add-Content "$env:CLEARMT4SETUPPowerShell\07-18.ps1" ''# Step 7.19: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on profiles\default folder, delete content and create new folder is necessaryWrite-Host "Step 7.19: Build requirements to run this script -> Create additional file in batch to make all menu operational :: About on profiles\default folder, delete content and create new folder is necessary"Add-Content "$env:CLEARMT4SETUPPowerShell\07-19.ps1" '# About on profiles\default folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-19.ps1" 'Write-Host "About on profiles\default folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-19.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\profiles\default | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-19.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-19.ps1" '# About on tester\logs folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-19.ps1" 'Write-Host "About on tester\logs folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-19.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\profiles -Name default'Add-Content "$env:CLEARMT4SETUPPowerShell\07-19.ps1" ''# Step 7.20: Build requirements to run this script -> Create additional file in batch to make all menu operational :: Open all MetaTrader 4Write-Host "Step 7.20: Build requirements to run this script -> Create additional file in batch to make all menu operational :: Open all MetaTrader 4"Add-Content "$env:CLEARMT4SETUPPowerShell\07-20.ps1" '# Open all MetaTrader 4'Add-Content "$env:CLEARMT4SETUPPowerShell\07-20.ps1" 'Write-Host "Open all MetaTrader 4"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-20.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-20.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-20.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-20.ps1" ''# Step 7.21: Build requirements to run this script -> Create additional file in batch to make all menu operational :: Run all previous step in OneClickWrite-Host "Step 7.21: Build requirements to run this script -> Create additional file in batch to make all menu operational :: Run all previous step in OneClick"Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# Run all previous step in OneClick'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "Run all previous step in OneClick"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# Restart Windows Explorer'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "Restart Windows Explorer"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'taskkill /f /im explorer.exe /t'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Start-Process explorer.exe'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# Restart and Terminate all process MetaTrader 4'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "Restart and Terminate all process MetaTrader 4"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'taskkill /f /im terminal.exe /t'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on logs folder, delete older than 14 days'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on logs folder, delete older than 14 days"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\logs -Recurse | Where-Object {$_.Lastwritetime -lt (Get-Date).adddays(-22)} | Remove-Item'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on MQL4\Common folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on MQL4\Common folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\Common | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Remove-Item $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\Common -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on MQL4\Experts folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on MQL4\Experts folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Experts | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on MQL4\Experts folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on MQL4\Experts folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4 -Name Experts'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on MQL4\Images folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on MQL4\Images folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Images | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on MQL4\Images folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on MQL4\Images folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4 -Name Images'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on MQL4\Files folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on MQL4\Files folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Files | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on MQL4\Files folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on MQL4\Files folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4 -Name Files'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on MQL4\Include folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on MQL4\Include folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include -Recurse | Where-Object {(($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\Arrays*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\Canvas*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\ChartObjects*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\Charts*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\Controls*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\Files*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\Indicators*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\Strings*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\Tools*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\MovingAverages.mqh*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\Object.mqh*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\stderror.mqh*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\stdlib.mqh*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\StdLibErr.mqh*') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Include\WinUser32.mqh*'))} | Remove-Item -Recurse'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on MQL4\Indicators folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on MQL4\Indicators folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Indicators | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on MQL4\Indicators folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on MQL4\Indicators folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4 -Name Indicators'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on MQL4\Libraries folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on MQL4\Libraries folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Libraries -Recurse | Where-Object {(($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Libraries\stdlib.ex4') -and ($_.FullName -notlike 'C:\Users\*\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Libraries\stdlib.mq4*'))} | Remove-Item -Recurse'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on MQL4\Logs folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on MQL4\Logs folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Logs -Recurse | Where-Object {$_.Lastwritetime -lt (Get-Date).adddays(-22)} | Remove-Item'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on MQL4\Presets folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on MQL4\Presets folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Presets | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on MQL4\Presets folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on MQL4\Presets folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4 -Name Presets'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on MQL4\Scripts folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on MQL4\Scripts folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Scripts | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on MQL4\Scripts folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on MQL4\Scripts folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4 -Name Scripts'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on MQL4\Sounds folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on MQL4\Sounds folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Sounds | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on MQL4\Sounds folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on MQL4\Sounds folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\MQL4 -Name Sounds'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on history\mailbox folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on history\mailbox folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\history\mailbox | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on history\mailbox folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on history\mailbox folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\history -Name mailbox'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on history\deleted folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on history\deleted folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\history\deleted | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on history\deleted folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on history\deleted folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\history -Name deleted'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on tester\caches folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on tester\caches folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\tester\caches | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on tester\caches folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on tester\caches folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\tester -Name caches'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on tester\files folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on tester\files folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\tester\files | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on tester\files folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on tester\files folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\tester -Name files'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on tester\history folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on tester\history folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\tester\history | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on tester\history folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on tester\history folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\tester -Name history'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on tester\logs folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on tester\logs folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\tester\logs | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on tester\logs folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on tester\logs folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\tester -Name logs'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on profiles\default folder, delete content'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on profiles\default folder, delete content"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Get-ChildItem $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\profiles\default | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" '# About on tester\logs folder, and create new folder'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'Write-Host "About on tester\logs folder, and create new folder"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" 'New-Item -Type Directory -Path $env:USERPROFILE\AppData\Roaming\MetaQuotes\Terminal\*\profiles -Name default'Add-Content "$env:CLEARMT4SETUPPowerShell\07-21.ps1" ''# Step 7.22: Build requirements to run this script -> Create additional file in batch to make all menu operational :: Close this scriptWrite-Host "Step 7.22: Build requirements to run this script -> Create additional file in batch to make all menu operational :: Close this script"Add-Content "$env:CLEARMT4SETUPPowerShell\07-22.ps1" '# Close this script'Add-Content "$env:CLEARMT4SETUPPowerShell\07-22.ps1" 'Write-Host "Close this script"'Add-Content "$env:CLEARMT4SETUPPowerShell\07-22.ps1" ''Add-Content "$env:CLEARMT4SETUPPowerShell\07-22.ps1" 'taskkill /F /FI "WINDOWTITLE eq Extra script for monitoring process real time" /T'Add-Content "$env:CLEARMT4SETUPPowerShell\07-22.ps1" 'rd "C:\TEMP\CLEARMT4SETUP\Baseline\" -Recurse -Force -Confirm:$false'Add-Content "$env:CLEARMT4SETUPPowerShell\07-22.ps1" 'rd "C:\TEMP\CLEARMT4SETUP\BatchFile\" -Recurse -Force -Confirm:$false'Add-Content "$env:CLEARMT4SETUPPowerShell\07-22.ps1" 'rd "C:\TEMP\CLEARMT4SETUP\Extras\" -Recurse -Force -Confirm:$false'Add-Content "$env:CLEARMT4SETUPPowerShell\07-22.ps1" 'rd "C:\TEMP\CLEARMT4SETUP\Logs\" -Recurse -Force -Confirm:$false'Add-Content "$env:CLEARMT4SETUPPowerShell\07-22.ps1" 'rd "C:\TEMP\CLEARMT4SETUP\PowerShell\" -Recurse -Force -Confirm:$false'Add-Content "$env:CLEARMT4SETUPPowerShell\07-22.ps1" 'rd "C:\TEMP\CLEARMT4SETUP\" -Recurse -Force -Confirm:$false'Add-Content "$env:CLEARMT4SETUPPowerShell\07-22.ps1" 'taskkill /F /FI "WINDOWTITLE eq www.forex-station.com" /T'Add-Content "$env:CLEARMT4SETUPPowerShell\07-22.ps1" ''# Step 8: Build requirements to run this script -> Create empty extra script for when the close this script when press x buttonWrite-Host "Step 8: Build requirements to run this script -> Create empty extra script for when the close this script when press x button"New-Item "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1"# Step 9: Build requirements to run this script -> Create extra script for when the close this script when press x buttonWrite-Host "Step 9: Build requirements to run this script -> Create extra script for when the close this script when press x button"Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" '# Extra script for monitoring process real time'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" 'Write-Host "Extra script for monitoring process real time"'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" '$host.ui.RawUI.WindowTitle = "Extra script for monitoring process real time"'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" ''Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" 'Start-Sleep -Seconds 20'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" '$processTitle = @('Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" ' "www.forex-station.com" #or whatever you want to monitor'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" ')'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" ''Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" 'Do { 'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" ' $ProcessesFound = Get-Process | Where-Object { $_.MainWindowTitle -eq $processTitle}'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" ' If ($ProcessesFound) {'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" ' Write-Host "Still running: $($ProcessesFound)"'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" ' Start-Sleep -Seconds 20'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" ' }'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" '} Until (!$ProcessesFound)'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" 'Remove-Item "C:\TEMP\CLEARMT4SETUP\Baseline" -Force -Recurse'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" 'Remove-Item "C:\TEMP\CLEARMT4SETUP\BatchFile" -Force -Recurse'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" 'Remove-Item "C:\TEMP\CLEARMT4SETUP\Extras" -Force -Recurse'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" 'Remove-Item "C:\TEMP\CLEARMT4SETUP\Logs" -Force -Recurse'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" 'Remove-Item "C:\TEMP\CLEARMT4SETUP\PowerShell" -Force -Recurse'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" 'Remove-Item "C:\TEMP\CLEARMT4SETUP" -Force -Recurse'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" 'Remove-Item -LiteralPath "C:\TEMP\CLEARMT4SETUP\Baseline" -Force -Recurse'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" 'Remove-Item -LiteralPath "C:\TEMP\CLEARMT4SETUP\BatchFile" -Force -Recurse'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" 'Remove-Item -LiteralPath "C:\TEMP\CLEARMT4SETUP\Extras" -Force -Recurse'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" 'Remove-Item -LiteralPath "C:\TEMP\CLEARMT4SETUP\Logs" -Force -Recurse'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" 'Remove-Item -LiteralPath "C:\TEMP\CLEARMT4SETUP\PowerShell" -Force -Recurse'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" 'Remove-Item -LiteralPath "C:\TEMP\CLEARMT4SETUP" -Force -Recurse'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" 'exit 0'Add-Content "$env:CLEARMT4SETUPExtras\SecondaryPowershellScript.ps1" ''# Step 10: Run main script PSScriptMenuGui all options# Source at: https://github.com/dan-osull/PowerShell-Script-Menu-Gui/blob/master/PSScriptMenuGui/examples/PSScriptMenuGui_all_options.ps1Write-Host "Step 11: Run main script PSScriptMenuGui all options"$host.ui.RawUI.WindowTitle = "PSScriptMenuGui all options"# Start region setup Set-Location $PSScriptRootRemove-Module PSScriptMenuGui -ErrorAction SilentlyContinuetry { Import-Module PSScriptMenuGui -ErrorAction Stop}catch { Write-Warning $_ Write-Verbose 'Attempting to import from parent directory...' -Verbose Import-Module '..\'}$params = @{ csvPath = 'C:\TEMP\CLEARMT4SETUP\Baseline\BuildMENU.csv' windowTitle = 'www.forex-station.com' buttonForegroundColor = 'Azure' buttonBackgroundColor = '#080808' noExit = $false Verbose = $true}# Step 11: Build requirements to run this script -> Clear windows variables generated previouslyWrite-Host "Step 11: Build requirements to run this script -> Clear windows variables generated previously"$env:CLEARMT4SETUPBaseline = ''$env:CLEARMT4SETUPBatchFile = ''$env:CLEARMT4SETUPPowerShell = ''$env:CLEARMT4SETUPExtras = ''$env:CLEARMT4SETUPLog = ''# Step 12: Warning before running scriptWrite-Host "Step 12: Warning before running script"$sh = New-Object -ComObject "Wscript.Shell"$sh.Popup("Before using, atention this applies to all MetaTrader 4 installed on this computer", 5, "CLEARMT4SETUP.ps1", 0 + 64)# Step 13: Run menuWrite-Host "Step 13: Run menu"Show-ScriptMenuGui @params # Step 14: Build requirements to run this script -> Run secondary script generated in hidden processWrite-Host "Step 14: Build requirements to run this script -> Run secondary script generated in hidden process"C:\TEMP\CLEARMT4SETUP\Extras\SecondaryPowershellScript.ps1
Statistics: Posted by Curioso — Fri Apr 26, 2024 9:12 pm — Replies 1 — Views 210
Statistics: Posted by JohnnyRy — Fri Apr 26, 2024 1:32 am — Replies 0 — Views 85
Statistics: Posted by JohnnyRy — Fri Apr 26, 2024 1:28 am — Replies 0 — Views 63
Statistics: Posted by JohnnyRy — Fri Apr 26, 2024 1:24 am — Replies 0 — Views 60
Statistics: Posted by JohnnyRy — Fri Apr 26, 2024 1:05 am — Replies 0 — Views 85
Statistics: Posted by AdeelFx0 — Thu Apr 25, 2024 5:42 am — Replies 1 — Views 550
Statistics: Posted by Ogee — Wed Apr 24, 2024 9:30 pm — Replies 2 — Views 206