Instructions for batch configuring properties for LDPlayer using .bat file

ARTRU

Those who have used MEMUPlayer have seen its convenience, right? From window arrangement to batch configuration, everything is available in its settings.

Optimization MEMUPlayer
Optimization MEMUPlayer

LDPlayer is not as versatile as MEMUPlayer. Especially in old versions LD3, LD4.

In this article, I will guide you to configure a series of properties for LDPlayer using a .bat file. .bat

You may also know LDPlayer supports CMD commands to customize many things. Including the item property setting Used to customize virtual machine configuration such as resolution, cpu, ram,...

modify <--name mnq_name | --index mnq_idx>
    [--resolution ]
    [--cpu <1 | 2 | 3 | 4>]
    [--memory <512 | 1024 | 2048 | 4096 | 8192>]
    [--manufacturer asus]
    [--model ASUS_Z00DUO]
    [--pnumber 13812345678]
    [--imei ]
    [--imsi ]    
    [--simserial ]
    [--androidid ]
    [--mac ]
    [--autorotate <1 | 0>]
    [--lockwindow <1 | 0>]

For example:
dnconsole.exe modify --index 0 --resolution 600,360,160 --cpu 1 --memory 1024 --imei auto

However, the above code only applies to 1 virtual machine. If you have many virtual machines, you have to enter each line one by one and it is quite time-consuming.

--index 0 is the virtual machine ID number. It usually starts from 0 for the first virtual machine. Open LDMultiPlayer and you will see this ID list.

If anything is too difficult, chatGPT will take care of it 😀 . I have used chatGPT to come up with a solution for this mass configuration.

We will use the file .bat and put this file right into the installation folder of the LDPlayer you are using. Usually, you only need to change the resolution, core, ram, and device model. If you don't use it, you don't need to fill it in.

1.bat file in LDPlayer
1.bat file in LDPlayer

Right click on the file .bat select edit and enter the code below:

setlocal enabledelayedexpansion
for /l %%i in (0,1,10) do (
    dnconsole.exe modify --index %%i --resolution 200,150,60 --cpu 1 --ram 1536 --manufacturer asus --model ASUS_Z00DUO
)

Explanation for the above code:

  1. setlocal enabledelayedexpansion: Enables delay variable expansion mode, allowing the use of !variable! to expand variables in loop for
  2. for /l %%i in (0,1,10) do (: Loop for runs from 0 to 10 (including 10), with an increment of 1. The counter variable is %%i
  3. dnconsole.exe modify --index %%i --resolution 200,150,60 --cpu 1 --ram 1536 --manufacturer asus --model ASUS_Z00DUO: Run command dnconsole.exe to change LDPlayer parameters. The parameters include:
    • --index %%i: The ID index of the LDPlayer virtual machine. It is the variable %%i which you declared earlier.
    • --resolution 200,150,60: screen resolution with width: 200, height: 150, DPI: 60
    • --cpu 1: number of CPU cores is 1.
    • --ram 1536: RAM capacity is 1536 MB.
    • --manufacturer asus: Manufacturer is ASUS.
    • --model ASUS_Z00DUO: Device model is ASUS_Z00DUO.

To run in batch, just run the file .bat that's ok

COMMENT

Related Articles