Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

youtube-dl Windows: why so many registry references #22861

Closed
gitdjc opened this issue Oct 26, 2019 · 1 comment
Closed

youtube-dl Windows: why so many registry references #22861

gitdjc opened this issue Oct 26, 2019 · 1 comment

Comments

@gitdjc
Copy link

@gitdjc gitdjc commented Oct 26, 2019

Trying to understand why my latest config file causes youtube-dl to abort with

"youtube-dl: error: account username missing"

when invoked with any argument, even "abc".

I monitored a run using Sysinternals procmon, and see some interesting behavior, which is visible in the numbers. youtube-dl issues these calls (among others):

RegQueryKey to HKCU\Software\Classes: 18790 times
RegEnumKey to HKCR: 4284 times
RegQueryKey to HKLM: 3888 times
RegQueryKey to HKCU: 3849 times
CreateFile to M:\exe\youtube-dl.exe: 1930 times
CloseFile to M:\exe\youtube-dl.exe: 1894 times
RegEnumKey to HKCU\Software\Classes: 575 times
CloseFile to M:\exe: 20 times
CreateFile to M:\exe: 20 times
QueryDirectory to M:\exe\youtube-dl.exe: 20 times
RegOpenKey to HKLM\System\CurrentControlSet\Control\Session Manager: 16 times
RegQueryKey to HKCU\Software\Classes\Local Settings: 14 times
RegQueryKey to HKLM\System\CurrentControlSet\Services\WinSock2\Parameters\Protocol_Catalog9\Catalog_Entries: 14 times
RegCloseKey to HKLM\System\CurrentControlSet\Control\Session Manager: 8 times
RegQueryKey to HKLM\System\CurrentControlSet\Services\WinSock2\Parameters\NameSpace_Catalog5\Catalog_Entries: 7 times

RegQueryKey 18790 times: it appears to be enumerating and then examining every subkey of HKCU...Classes, in fact examining some of them several times. What's the point of enumerating and examining all these keys that, to me, seem to have no relationship at all to the task at hand?

RegEnumKey 4284 times: again, what's the point?

RegQueryKey 3888 times: ditto.

RegQueryKey 3849 times: ditto

CreateFile/CloseFile: why is the executable being opened and closed 1900 times? And why is its directory being opened, closed and queried (even just) 20 times?

Perhaps these bizarre figures originate in libraries that aren't themselves part of youtube-dl's source code, and then their authors might like to know this is happening. Anyone have an idea?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 26, 2019

youtube-dl does not issue any of these calls on its own, it's all done by py2exe.

@dstftw dstftw closed this Oct 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.