Step 1: Download the RUU for your phone:
GSM: GSM RUUs
(There are more GSM RUUs than CDMA, so here's all of them.)
Rogers RUU link is here.
Step 2: Place the PG86IMG.zip (CDMA- GSM will be similar) on the root of your sdcard.
Step 3: Reboot to recovery and wipe everything (Dalvik, cache, data, system, factory reset)
Step 4: Plug in your phone and reboot to bootloader via ADB
adb reboot bootloader
Step 6: Boot into fastboot
Step 7: Relock your bootloader
fastboot oem lock
Note: Your bootloader will say *** RELOCKED *** after you're done. That is how your carrier and HTC will know you've unlocked. There is no way to avoid this yet.
***** Make sure you put the CORRECT RUU image on you sdcard. If you have Sprint you're CDMA, if not, you're GSM. Don't mix the two up.
If you want to unlock your phone again after relocking, boot into fastboot and type:
fastboot flash Unlock_Code.bin
GSM RUUs from Football's thread here
CDMA RUU from Mr.ESP's post here