Autostart of terminals when rebooting VPS

29 May 2020, 21:13
Konstantin Kulikov
2
1 375
In order for the trading terminals to automatically start (and the experts continued their work) after a scheduled or unscheduled reboot of the VPS (remote computer), the following steps must be performed on it (instruction for Windows systems).

1) Auto-login to VPS account.

Create a text file on the VPS desktop with the name “regsetup.reg.txt” and copy this text into it:

Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]

"DefaultUserName"="Administrator"

"DefaultPassword"="123456789"

"AltDefaultUserName"="Administrator"

"AutoAdminLogon"="1"

You need to replace Administrator with your username (twice), and instead of 123456789 enter your password (this information is contained in the letter from the VPS provider).

Then save the file using the “Save As ...” command, deleting “.txt” in the file name and changing the file format to “All Files”:



Run the created file for execution (by double-clicking the left mouse button). In the message that appears, select "Yes", after which a message will appear stating that the change has been successfully made to the registry.


2) Selection of terminals for autorun.

Create a text file called “Terminals.cmd.txt” on the VPS desktop and copy this text into it:

rem *************************************************

rem *** Terminal will start after 30 seconds ***

rem *************************************************

ping localhost -n 30

start "1" "C:\MT5\MetaTrader 5 for FrankoScalp\terminal64"

start "2" "C:\MT4\MetaTrader 4 for Breakthrough St\terminal"

start "3" "C:\MT4\MetaTrader 4 for GridMartin Conq\terminal"

start "4" "C:\MT5\MetaTrader 5 for Good Monday\terminal64"

exit

Replace the paths to the terminals with your own (paths should contain only Latin characters). If more terminals are used, then add the missing lines, if less is used, then remove the extra ones.

Then save the file using the “Save As ...” command, deleting “.txt” in the file name and changing the file format to “All Files” (same as in paragraph 1).

Transfer the resulting file to the "StartUp" folder, the path to which:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp

This folder is hidden, to easily open it, copy the line above (folder path) and paste it into the Explorer line:



3) Creating a VPS reboots counter.

Create a text file called “rebootlog.cmd.txt” on the VPS desktop and copy this text into it:

echo --------------- >>C:\rebootlog.txt

echo last reboot at: >>C:\rebootlog.txt

date /T >>C:\rebootlog.txt

time /T >>C:\rebootlog.txt

Then save the file using the “Save As ...” command, deleting “.txt” in the file name and changing the file format to “All Files” (same as in paragraph 1).

Transfer the resulting file to the "StartUp" folder (same as in paragraph 2).

After rebooting the VPS, the “rebootlog.txt” file appears with the data on the reboot time on the C:\ drive:

This will let you know how often VPS reboots occur.


4) Opening the desired profile in the trading terminal.

When the terminal is started, the last open profile is automatically opened when the terminal is closed correctly (failure/restart of the VPS is an incorrect closing). So save your current profile and close the terminal, then open the terminal again, your profile should automatically open (if this happened, then when you restart the VPS, this profile will open in the terminal).


5) Setup is complete.

Now you need to restart the VPS and log into it after 5 minutes to check.

Profitable robots to you!:)
Share it with friends: