It is found that when running sync_all_dns directly, or run it via Windows task, when sync_all_dns is done, the windows is not closed automatically.
1. Create a bat file with below content:
Then sync_all_dns finished, window will be closed.
2. Run this bat file instead of sync_all_dns.