Hi,
Please do try these troubleshooting steps suggested by HP which apply to almost all laptop brands. If all these steps will not work I would suggest reinstalling Windows and if it will still not work your last option would be to replace the DVD drive.
http
/support.hp.com/us-en/document/c03280768