How do I automatically restart MetaTrader apps after the VPS restart?
Windows has a native feature to automatically restart all the open apps the next time you turn on or restart your computer or VPS.
For Virtual Private Server (VPS)
Method 1:
Windows supports this natively through Scheduled Tasks. Setting up one for Power On is done via the command line using something along the lines of:
schtasks.exe /create /tn "Task Name" /ru SYSTEM /Sc ONSTART /tr
"C:\command2run.cmd"
Method 2:
Step 1. Open the Windows Startup Folder.
Step 2. Locate the terminal.exe file of MetaTrader 4 or MetaTrader 5.
Step 3. Create a shortcut of MetaTrader 4 terminal .exe file in the startup folder.
Video guide:
Details:
Step 1
Windows Startup Folder is a hidden system folder. There are two ways you can open this folder
- Through file explorer from the taskbar and go to this path: %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup
- The second one is you can open it using the shell command (shell:startup). You can execute the shell command from the ‘'Run’' dialog box.
![VPSFAQs10.jpg](https://eu-images.contentstack.com/v3/assets/bltaec35894448c7261/blt27955ecb65b9f094/65ba10b8c8dd95040a24914f/VPSFAQs10.jpg)
![VPSFAQs11.jpg](https://eu-images.contentstack.com/v3/assets/bltaec35894448c7261/blt20b2f4c6b761120d/65ba10ce3bc06c040a4a7f4f/VPSFAQs11.jpg)
Step 2:
Locate the terminal.exe file
Generally, the .exe file of MetaTrader 4 is located in the C:\Program Files (x86)\Pepperstone MetaTrader 4
![VPSFAQs12.jpg](https://eu-images.contentstack.com/v3/assets/bltaec35894448c7261/blt4dec97a6f57855e9/65ba10ddebdc36040a8a6461/VPSFAQs12.jpg)
Step 3.
Copy the terminal.exe file and past it into the Startup folder as a shortcut
![VPSFAQs13.jpg](https://eu-images.contentstack.com/v3/assets/bltaec35894448c7261/blt73cf063a2006e5f9/65ba10faa3d088040aa06485/VPSFAQs13.jpg)
For Personal computers Windows 10 and 11
Search for Settings or Manage Your Account > Sign-in options > Restart apps, turn it on
![VPSFAQs14.jpg](https://eu-images.contentstack.com/v3/assets/bltaec35894448c7261/blt4c3734ba8b620c93/65ba110c9d4e79040a4e39dc/VPSFAQs14.jpg)