You can't use a computer to format the phone. The actual formatting process needs to be done on the phone using a key combination. To hard reset (format) it, turn off the phone then press Volume + & Volume - & Power button until two options are presented: Recovery & Factory. Select Recovery and then use volume buttons to navigate through the options. In the end select Wipe Data and reboot the phone. This process will remove the password and any custom apps or settings.