You must have HTC Drivers in your PC .
1 - Getting MSL / SPC
Dial ##3424# then choose DM ON .
If it asks you for MSL/SPC .
or you can go with the old method
You must be rooted
Write this in cmd
adb shell su echo 1 > /sys/devices/virtual/android_usb/android0/f_diag/func_en
a - Download Basic-Flasher.7z
b - Open Basic-Flasher click scan then select your phone port number and then connect.
c - Select HTC instead of nv, then click read, the MSL/SPC should appear down .
2 - Unlock
a - Open NV reader/writer tools
b - Click "port" in the top left and select your phone serial port.
c - Make sure BOTH boxes in the top bar are checked, and write you SPC/MSL in the box where is 000000
d - Click connect in the top par.
e - Click read in the top par which is next to connect not the other one, you should see a log message bellow says the > SPC is correct. Phone unlocked .
f - Make a backup for your current nv item
Where is Range (Dec): you will see two boxes, write in both of them this number, which is the number of the item that
will be changed, 30159 , now click Read and save it .
g - Click Write and choose the attached unlock file .
h - Go to Mode and then reboot .
If didn't work try factory reset. If didn't work also try flashing RUU again .
thats it I hope it helps