This was done on MySQL 5.7.9. Probably MySQL is running on windows as a service.
Stop the service.
Look at the service details to find what defaults-file argument is being passed. Open an administrative command prompt and do this (adjusted for your environment)
cd C:\Program Files\MySQL\MySQL Server 5.7\bin
mysqld --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini" --skip-grant-tables --console
Open another administrative command prompt and do this (adjusted for your environment)
mysql.exe -u root
mysql> select user(), current_user();
mysql> flush privileges;
update mysql.user set authentication_string=password('newpassword') where user='root';
Kill the mysqld process running in task manager.
Start the service.