There are a few steps only & they are idiot proof.The regular method posted in the official & some other threads can give you more than one DeviceID for your Phone if you have plugged the Phone in different USB Ports.
Even searching in Registry can give you more than one DeviceID if you used multiple USB Ports.So, in that case you will need to know which is the correct deviceID for your model & this does not involve searching in Registry.
1) Install SEUS ( Sony Ericsson Update Service ) from the official website.
2) Install the Update Software while your phone is connected to your machine.After installing the Software , Disconnect your Phone from your Computer & start the Update application & follow the prompts.
3) Put your phone in Flash Mode.
4) A Green light will turn on while your phone is off if you have done it properly which is shown on the above picture.
5) Now press your Keyboard's Windows & Pause Break buttons at the same time.And go to Device Manager.
6) Expand the " Universal Serial Bus Controllers " & Click on " SEMC Flash Device " .
7) Now from the SEMC Flash device window, scroll through the value of " Device Instance ID " .
8) There you will get your DeviceID.Just highlight & Ctrl+C & Paste it in a Notepad.As you know the last parts are your DeviceID.
In this way you will not search into registry & you will get the correct DeviceID every time you connect your Phone to your machine in the Flash Mode.