Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Updating in Windows using -U or --update switch results in cmd crash #13618
Comments
|
No, it should not. |
|
Try this one once.Copy your executable to any folder residing in any other drive other than C. eg : In d: drive. paste youtube-dl.exe there. copy this into bat file The first should update the youtube-dl.exe and close itself. The other should download some video which you provided instead of [url] and close itself.Anything other than these is a windows issue |
|
I cant seem to narrow it down to where the problem is and I made a workaround for my application... |
|
@mikeyhalla If the problem was fixed with a workaround you can help others who may have similar or same issue. If you simply put these in your batch file,cmd would run,read the script,update youtube-dl and exit itself the script being If the script is not being called then either you dont have youtube-dl.exe in the path where the batch file is present or their is cmd restriction in your active directory.Which can done via invoking c:\windows\system32\cmd.exe. By the way the error code is likely due to these issues. http://www.techsupportforum.com/forums/f10/solved-error-0xc0000142-178253.html |
|
Yeah, thx but I tried pretty much everything to fix it and since I don't code in Python then I can't test youtube-dl. But just to let you know it only happens when the batch file is created for replacing the file. My workaround was to create another exe that runs the update and ends before the update is finished so no error is even acknowledged. I suggest the dev take a close look at this issue. I am pretty wise about my computer and this is the only program giving me problems. Bugs happen whether it be in youtube-dl or mine. I cant find it in mine so I just did the workaround. |
|
okay but as I am a developer,not here though.If you have python 2.7 installed try this one once.Open this in browser or any dowonload manager https://yt-dl.org/downloads/latest/youtube-dl.You will find a 1.5 MB youtube-dl file.As soon as it downloads run cmd and type the command "python youtube-dl".If it works its ok so far.Then in the file add .zip extension and unzip it via winzip or winrar or any utlitiy. The folder structure will have
Navigate to this folder using cd,and once its reaches.Try this in terminal "python main.py ".If it works then write a batch script here that would contain these codes for now. |
Updating in windows causes cmd to crash and I believe the problem is in the batch file code.
`
@echo off
echo Waiting for file handle to be closed ...
ping 127.0.0.1 -n 5 -w 1000 > NUL
move /Y "C:\Michael Hall\Workspace\Development\Old Projects\MediaDownloader\MediaDownloader\bin\Release\youtube-dl.exe.new" "C:\Michael Hall\Workspace\Development\Old Projects\MediaDownloader\MediaDownloader\bin\Release\youtube-dl.exe" > NUL
echo Updated youtube-dl to version 2017.07.09.
start /b "" cmd /c del "%~f0"&exit /b"
`
Should not the last line have 2 & and spaces? Eg. start /b "" cmd /c del "%~f0" && exit /b" or even better:

start /b "" cmd /c del "%~f0"
exit
Honestly I don't know but it gets stuck in cmd window and throws an error if using C# for example for standard output;