-move /Y "%s.new" "%s"
-del "%s"
- \n""" %(exe, exe, bat))
- b.close()
-
- os.startfile(bat)
- except (IOError, OSError) as err:
+move /Y "%s.new" "%s" > NUL
+echo Updated youtube-dl to version %s.
+start /b "" cmd /c del "%%~f0"&exit /b"
+ \n""" % (exe, exe, version_id))
+
+ subprocess.Popen([bat]) # Continues to run in the background
+ return # Do not show premature success messages
+ except (IOError, OSError):