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.
youtube-dl Windows: why so many registry references #22861
Comments
|
youtube-dl does not issue any of these calls on its own, it's all done by py2exe. |
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?