Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Who here has a Youtube-DL compile for WinXP?

Featured Replies

When tested if this Node version would work on Vista, I got this:

The procedure entry point EventSetInformation could not be located in the dynamic link library ADVAPI32.dll

 


Breaking news: 

https://github.com/yt-dlp/yt-dlp/issues/14404#issue-3444474002

Quote

6. What about QuickJS?

Edit: It will be supported.

10. What is the minimum required version of Node/Bun/QuickJS?

QuickJS: 2023-12-9

QuickJS version 2025-09-13 or later is strongly recommended for performance reasons

https://bellard.org/quickjs/binary_releases/?C=M;O=D

For my Vista SP2 32-bit laptop: 

https://bellard.org/quickjs/binary_releases/quickjs-win-i686-2025-09-13.zip

... and: 

qjs -h

QuickJS version 2025-09-13
usage: qjs [options] [file [args]]
-h  --help         list options
-e  --eval EXPR    evaluate EXPR
-i  --interactive  go to interactive mode
-m  --module       load as ES6 module (default=autodetect)
    --script       load as ES6 script (default=autodetect)
-I  --include file include an additional file
    --std          make 'std' and 'os' available to the loaded script
-T  --trace        trace memory allocation
-d  --dump         dump the memory usage stats
    --memory-limit n  limit the memory usage to 'n' bytes (SI suffixes allowed)
    --stack-size n    limit the stack size to 'n' bytes (SI suffixes allowed)
    --no-unhandled-rejection  ignore unhandled promise rejections
-s                    strip all the debug info
    --strip-source    strip the source code
-q  --quit         just instantiate the interpreter and quit

Though, this might still mean nothing, as I haven't gotten around to actually trying 

https://github.com/yt-dlp/yt-dlp/pull/14157

on this machine...

Wiki (WIP): 

https://github.com/coletdjnz/yt-dlp-wiki-dev/blob/ejs/EJS.md

6 hours ago, nicolaasjan said:

When tested if this Node version would work on Vista, I got this:

The procedure entry point EventSetInformation could not be located in the dynamic link library ADVAPI32.dll

Most sadly, this is only part of the story :( ; probing the v20.19.2 (32-bit) binary (a whooping 61.3 MiB in filesize) with DependencyWalker, I found a total of six (6) Vista-incompatible function calls: 

in advapi32.dll:

EventSetInformation

in kernel32.dll:

K32GetModuleBaseNameW
K32GetProcessMemoryInfo
ResolveLocaleName
TryAcquireSRWLockExclusive
TryAcquireSRWLockShared

The first one can also be a thing on a partially updated Win7 SP1 install (see this); thank you for already raising a Vista-support issue with Vladimir :thumbup ...

7 hours ago, nicolaasjan said:

Test binary here

1. This one does launch OK under Vista SP2 32-bit :) .

8 hours ago, nicolaasjan said:

Added to the config file:

--remote-components ejs:github
--js-runtimes node
--remote-components ejs:npm

2. Instead of the cmdline flag/config setting

"--remote-components ejs:github"

you could've built the PyInstaller binary with the EJS components bundled, as will upstream do ;) 

https://github.com/coletdjnz/yt-dlp-wiki-dev/blob/ejs/EJS.md#step-2-install-ejs-challenge-solver-scripts

Quote

Official PyInstaller-bundled executable -> No additional action required. All the necessary JavaScript components will be bundled with these executables.

You can install them via PyPI prior to PyInst compilation: 

python -m pip install -U yt-dlp-ejs

and, hopefully, they'll be integrated into the produced executable, just like the rest of the default Python modules...

3. " --remote-components ejs:npm" applies ONLY to deno/bun, NOT to node used on Win7 :whistle: 

https://github.com/coletdjnz/yt-dlp-wiki-dev/blob/ejs/EJS.md#option-2-enable-ejs-script-downloads-from-npm

4. At the time the binary was compiled, quickjs support hadn't yet arrived, thus: 

yt-dlp_x86 --ies youtube -vF "yrcIdXBwVww" --remote-components ejs:github --js-runtimes quickjs =>

...
WARNING: Ignoring unsupported JavaScript runtime(s): quickjs. Supported runtimes: deno, node, bun.
...
[debug] [youtube] [jsc] JS Challenge Providers: bun (unavailable), deno (unavailable), node (unavailable)
...
[info] Available formats for yrcIdXBwVww:
ID  EXT   RESOLUTION FPS |  FILESIZE   TBR PROTO | VCODEC      ACODEC    MORE INFO
-----------------------------------------------------------------------------------
sb3 mhtml 48x27        0 |                 mhtml | images                storyboard
sb2 mhtml 80x45        1 |                 mhtml | images                storyboard
sb1 mhtml 160x90       1 |                 mhtml | images                storyboard
sb0 mhtml 320x180      1 |                 mhtml | images                storyboard
91  mp4   256x144     30 | ~ 3.43MiB  123k m3u8  | avc1.4D400C mp4a.40.5 WEB-S
92  mp4   426x240     30 | ~ 5.41MiB  195k m3u8  | avc1.4D4015 mp4a.40.5 WEB-S
93  mp4   640x360     30 | ~11.03MiB  397k m3u8  | avc1.4D401E mp4a.40.2 WEB-S
94  mp4   854x480     30 | ~20.21MiB  728k m3u8  | avc1.4D401F mp4a.40.2 WEB-S
95  mp4   1280x720    30 | ~41.07MiB 1479k m3u8  | avc1.64001F mp4a.40.2 WEB-S
96  mp4   1920x1080   30 | ~81.20MiB 2923k m3u8  | avc1.640028 mp4a.40.2 WEB-S

Best regards.

15 hours ago, VistaLover said:

I'm seeing archive "libfdk-aac-v2.0.3-158-gd8e6b1a-x86.7z" intended for Win7SP1_x86; this one affords a DLL much larger (2.10 MiB) than the DLL extracted from archive "libfdk-aac-2.0.3-158-d8e6b1a-win32-xpmod-P4.7z" (1.33 MiB) 

Either libfdk-aac library should work fine on Vista. 

The Windows 7 version was compiled with GCC 15 but it looks like I neglected to strip the file so it is larger than it needs to be.

I will link a corrected file next time.  Thanks for bringing that to my attention. 

Edited by autodidact

6 hours ago, VistaLover said:

Instead of the cmdline flag/config setting

"--remote-components ejs:github"

you could've built the PyInstaller binary with the EJS components bundled, as will upstream do ;) 

https://github.com/coletdjnz/yt-dlp-wiki-dev/blob/ejs/EJS.md#step-2-install-ejs-challenge-solver-scripts

You're right. I should have read the Wiki first. :blushing:

Here is an updated build with quickjs support and EJS bundled.

However, quickjs isn't that quick...

It took 28 minutes to figure out `yt-dlp -F URL` (in the meantime using a lot of memory and CPU).

spacer.png

5 hours ago, autodidact said:

but it looks like I neglected to strip the file so it is larger than it needs to be.

... Indeed :P ; I still keep an old (2018) version of MABS on an external disk, I used that to "strip" the DLL, 

$ cd ~
$ strip "libfdk-aac-2.dll"

and filesize was reduced from 2.11 MiB to 1.73 MiB (but still larger than the 1.34 MiB of the "xpmod-P4" variety ;) ) ...

6 hours ago, nicolaasjan said:

It took 28 minutes to figure out `yt-dlp -F URL` (in the meantime using a lot of memory and CPU).

My bad. I took the wrong one. :blushing:

Go here.

Now it took 9 seconds to calculate. 😀

Edited by nicolaasjan

7 hours ago, nicolaasjan said:

However, quickjs isn't that quick...

It took 28 minutes to figure out `yt-dlp -F URL` (in the meantime using a lot of memory and CPU).

1 hour ago, nicolaasjan said:

My bad . I took the wrong one.

Go here.

Now it took 9 seconds to calculate. 😀

I had just completed my initial testing of your latest build :thumbup on this old and under-resourced Vista SP2 32-bit laptop and,  thankfully :cheerleader:, I couldn't possibly reproduce your initial miserable qjs execution times ;) ; FTR, this machine has a (2007-era) Intel Core2Duo T5250@1.50GHz CPU and 3GiB of DDR2 RAM; I used my stopwatch to time below yt-dlp command: 

yt-dlp_x86 --ies youtube --js-runtimes quickjs -vF "yrcIdXBwVww"

and it actually took just 43s from when I clicked ENTER to full completion: 

[debug] Command-line config: ['--ies', 'youtube', '-vF', 'yrcIdXBwVww', '--js-runtimes', 'quickjs']
[debug] Encodings: locale cp1253, fs utf-8, pref cp1253, out utf-8 (No VT), error utf-8 (No VT), screen utf-8 (No VT)
[debug] yt-dlp version local@2025.10.27 [937b84ddb] (win_x86_exe)
[debug] Python 3.14.0 (CPython x86 32bit) - Windows-Vista-6.0.6003-SP2 (OpenSSL 3.0.18 30 Sep 2025)
[debug] exe versions: none
[debug] Optional libraries: Cryptodome-3.23.0, brotli-1.1.0, certifi-2025.10.05, mutagen-1.47.0, requests-2.32.5, sqlite3-3.50.4, urllib3-2.5.0, websockets-15.0.1, yt_dlp_ejs-0.2.1
[debug] JS runtimes: quickjs-2025-09-13
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Plugin directories: none
[debug] Loaded 1 extractors
[debug] [youtube] [pot] PO Token Providers: none
[debug] [youtube] [pot] PO Token Cache Providers: memory
[debug] [youtube] [pot] PO Token Cache Spec Providers: webpo
[debug] [youtube] [jsc] JS Challenge Providers: bun (unavailable), deno (unavailable), node (unavailable), quickjs
[youtube] Extracting URL: yrcIdXBwVww
[youtube] yrcIdXBwVww: Downloading webpage
[youtube] yrcIdXBwVww: Downloading tv client config
[youtube] yrcIdXBwVww: Downloading player 25f1a420-main
[debug] Saving youtube-sts.25f1a420-main to cache
[youtube] yrcIdXBwVww: Downloading tv player API JSON
[youtube] yrcIdXBwVww: Downloading web safari player API JSON
[debug] [youtube] [jsc:quickjs] Using challenge solver lib script v0.2.1 (source: python package, variant: minified)
[debug] [youtube] [jsc:quickjs] Using challenge solver core script v0.2.1 (source: python package, variant: minified)
[debug] [youtube] [jsc:quickjs] Running quickjs: qjs --script 'C:\Users\<redacted>\AppData\Local\Temp\tmpp_d3itxv.js'
[youtube] yrcIdXBwVww: Downloading m3u8 information
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec, channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[info] Available formats for yrcIdXBwVww:
ID  EXT   RESOLUTION FPS CH |   FILESIZE   TBR PROTO | VCODEC        VBR ACODEC     ABR ASR MORE INFO
------------------------------------------------------------------------------------------------------------------
sb3 mhtml 48x27        0    |                  mhtml | images             storyboard
sb2 mhtml 80x45        1    |                  mhtml | images             storyboard
sb1 mhtml 160x90       1    |                  mhtml | images             storyboard
sb0 mhtml 320x180      1    |                  mhtml | images             storyboard
140 m4a   audio only      2 |    3.60MiB  129k https | audio only        mp4a.40.2  129k 44k medium, TV, m4a_dash
251 webm  audio only      2 |  103.22KiB    4k https | audio only        opus      4k 48k medium, TV, webm_dash
91  mp4   256x144     30    | ~  3.43MiB  123k m3u8  | avc1.4D400C       mp4a.40.5           WEB-S
160 mp4   256x144     30    |  801.69KiB   28k https | avc1.4d400c   28k video only          144p, TV, mp4_dash
278 webm  256x144     30    |  806.96KiB   28k https | vp9           28k video only          144p, TV, webm_dash
92  mp4   426x240     30    | ~  5.41MiB  195k m3u8  | avc1.4D4015       mp4a.40.5           WEB-S
133 mp4   426x240     30    |    1.47MiB   53k https | avc1.4d4015   53k video only          240p, TV, mp4_dash
242 webm  426x240     30    |    1.22MiB   44k https | vp9           44k video only          240p, TV, webm_dash
93  mp4   640x360     30    | ~ 11.03MiB  397k m3u8  | avc1.4D401E       mp4a.40.2           WEB-S
134 mp4   640x360     30    |    2.83MiB  102k https | avc1.4d401e  102k video only          360p, TV, mp4_dash
18  mp4   640x360     30  2 |    4.15MiB  149k https | avc1.42001E       mp4a.40.2       22k 360p, TV
243 webm  640x360     30    |    2.36MiB   85k https | vp9           85k video only          360p, TV, webm_dash
94  mp4   854x480     30    | ~ 20.21MiB  728k m3u8  | avc1.4D401F       mp4a.40.2           WEB-S
135 mp4   854x480     30    |    4.91MiB  177k https | avc1.4d401f  177k video only          480p, TV, mp4_dash
244 webm  854x480     30    |    4.22MiB  152k https | vp9          152k video only          480p, TV, webm_dash
95  mp4   1280x720    30    | ~ 41.07MiB 1479k m3u8  | avc1.64001F       mp4a.40.2           WEB-S
136 mp4   1280x720    30    |   10.33MiB  372k https | avc1.64001f  372k video only          720p, TV, mp4_dash
247 webm  1280x720    30    |    9.39MiB  338k https | vp9          338k video only          720p, TV, webm_dash
96  mp4   1920x1080   30    | ~ 81.20MiB 2923k m3u8  | avc1.640028       mp4a.40.2           WEB-S
137 mp4   1920x1080   30    |   20.18MiB  727k https | avc1.640028  727k video only          1080p, TV, mp4_dash
248 webm  1920x1080   30    |   16.53MiB  596k https | vp9          596k video only          1080p, TV, webm_dash
271 webm  2560x1440   30    |   41.46MiB 1494k https | vp9         1494k video only          1440p, TV, webm_dash

Those 43s include the time the PyInst binary took to extract its content inside the %TEMP% folder of my Windows User Account :P ; and this was for the FIRST yt-dlp invocation, next ones took even less :cheerleader:; TL:DR: QuickJS is totally workable here, thanks a lot to you, to the yt-dlp devs and to a certain GitHub member (barracuda156) who actually "fought" to have QJS included as a supported external JS runtime! Below, an actual successful DL log: 

yt-dlp_x86 --ies youtube --js-runtimes quickjs -vf 140 "yrcIdXBwVww"

[debug] Command-line config: ['--ies', 'youtube', '--js-runtimes', 'quickjs', '-vf', '140', 'yrcIdXBwVww']
[debug] Encodings: locale cp1253, fs utf-8, pref cp1253, out utf-8 (No VT), error utf-8 (No VT), screen utf-8 (No VT)
[debug] yt-dlp version local@2025.10.27 [937b84ddb] (win_x86_exe)
[debug] Python 3.14.0 (CPython x86 32bit) - Windows-Vista-6.0.6003-SP2 (OpenSSL 3.0.18 30 Sep 2025)
[debug] exe versions: ffmpeg 5.0 (fdk,setts)
[debug] Optional libraries: Cryptodome-3.23.0, brotli-1.1.0, certifi-2025.10.05, mutagen-1.47.0, requests-2.32.5, sqlite3-3.50.4, urllib3-2.5.0, websockets-15.0.1, yt_dlp_ejs-0.2.1
[debug] JS runtimes: quickjs-2025-09-13
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Plugin directories: none
[debug] Loaded 1 extractors
[debug] [youtube] [pot] PO Token Providers: none
[debug] [youtube] [pot] PO Token Cache Providers: memory
[debug] [youtube] [pot] PO Token Cache Spec Providers: webpo
[debug] [youtube] [jsc] JS Challenge Providers: bun (unavailable), deno (unavailable), node (unavailable), quickjs
[youtube] Extracting URL: yrcIdXBwVww
[youtube] yrcIdXBwVww: Downloading webpage
[youtube] yrcIdXBwVww: Downloading tv client config
[debug] Loading youtube-sts.6e4dbefe-main from cache
[youtube] yrcIdXBwVww: Downloading tv player API JSON
[youtube] yrcIdXBwVww: Downloading web safari player API JSON
[youtube] yrcIdXBwVww: Downloading player 6e4dbefe-main
[debug] [youtube] [jsc:quickjs] Using challenge solver lib script v0.2.1 (source: python package, variant: minified)
[debug] [youtube] [jsc:quickjs] Using challenge solver core script v0.2.1 (source: python package, variant: minified)
[debug] [youtube] [jsc:quickjs] Running quickjs: qjs --script 'C:\Users\<redacted>\AppData\Local\Temp\tmp8kc1jvmr.js'
[youtube] yrcIdXBwVww: Downloading m3u8 information
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec, channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[info] yrcIdXBwVww: Downloading 1 format(s): 140
[debug] Invoking http downloader on "https://rr1---sn-4vguioxu-n3bz.googlevideo.com/videoplayback?expire=1761596706&ei=woD_aJTNJ_eG0u8Psu7R0AE&ip=<redacted>&id=o-ABLy9SDAL9azDltc64Qry1Wjfc2T-ukUkgAK7YIGNBjU&itag=140&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&met=1761575106%2C&mh=e1&mm=31%2C29&mn=sn-4vguioxu-n3bz%2Csn-nv47lnsk&ms=au%2Crdu&mv=m&mvi=1&pl=22&rms=au%2Cau&initcwndbps=1093750&bui=AdEuB5S9H_ZLOx4DhWandbVVoE2T23TniDsH9dzuJWA1A2BTXilW4PS4MvJfCH8rm5PYm_rkKk1bNbUl&vprv=1&svpuc=1&mime=audio%2Fmp4&ns=3j_zEDpH1UcvQ1PnFTnBiuoQ&rqh=1&gir=yes&clen=3769997&dur=232.896&lmt=1758938329553945&mt=1761574619&fvip=3&keepalive=yes&lmw=1&fexp=51557447%2C51565115%2C51565682%2C51580970&c=TVHTML5&sefc=1&txp=6208224&n=Uyc5Xoc53RETOw&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJfQdSswRAIgYqAE1n3WKMewWR3MOnwuPURtZm5QnMnZlMtNJQaTmV0CIDbOyrrvXFyR2m1kUheTy_ik6DIXA9UXoZzbOs1ffk3a&lsparams=met%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Crms%2Cinitcwndbps&lsig=APaTxxMwRQIgGZIroMcG7xUvn-eLhnLxe3FP_A-zu5lRB5wrz3pjoEoCIQChTmzqkvfj8R_MXFuYDQ5u9h56fAQdFtIm902IyqUrCg%3D%3D"
[debug] File locking is not supported. Proceeding without locking
[download] Destination: Patching yt-dlp (silent) [yrcIdXBwVww].m4a
[download] 100% of    3.60MiB in 00:00:04 at 782.66KiB/s
[FixupM4a] Correcting container of "Patching yt-dlp (silent) [yrcIdXBwVww].m4a"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i "file:Patching yt-dlp (silent) [yrcIdXBwVww].m4a" -map 0 -dn -ignore_unknown -c copy -f mp4 -movflags +faststart "file:Patching yt-dlp (silent) [yrcIdXBwVww].temp.m4a"

 

1 hour ago, nicolaasjan said:

Go here.

... Which is where I pointed people to in my previous post ;) : 

15 hours ago, VistaLover said:

 

51 minutes ago, nicolaasjan said:

Install Quickjs in your PATH and add `--js-runtimes quickjs` to your config.

So, does the latest QJS (32-bit) launch on WinXP SP3? FWIW, I don't like adding stuff to PATH unless I can't do otherwise; placing the qjs.exe (with its DLL dependency) adjacent to the yt-dlp_x86.exe binary was all it took here ;) ...

And a slight word of caution: Of the four external JS runtimes supported by yt-dlp, QJS is the least secure one :whistle:; it has no sandbox, needs to write to the host machine's TEMP dir and is subject to some exploits related to Temp files:

https://github.com/coletdjnz/yt-dlp-wiki-dev/blob/ejs/EJS.md#notes-3

Quote

Both QuickJS and QuickJS-NG do not fully allow executing files from stdin, so yt-dlp will create temporary files for each EJS script execution. This can theoretically lead to time-of-check to time-of-use (TOCTOU) vulnerabilities.

Myself, I'd ONLY invoke it from the cmdline when I need to use YT, not permanently enable it via a config setting; call me paranoid :sneaky: ...

Kind regards.

Edited by VistaLover

1 hour ago, VistaLover said:

So, does the latest QJS (32-bit) launch on WinXP SP3?

Yes:

Microsoft Windows XP [versie 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\WINDOWS\system32>qjs -h
QuickJS version 2025-09-13
usage: qjs [options] [file [args]]
-h  --help         list options
-e  --eval EXPR    evaluate EXPR
-i  --interactive  go to interactive mode
-m  --module       load as ES6 module (default=autodetect)
    --script       load as ES6 script (default=autodetect)
-I  --include file include an additional file
    --std          make 'std' and 'os' available to the loaded script
-T  --trace        trace memory allocation
-d  --dump         dump the memory usage stats
    --memory-limit n  limit the memory usage to 'n' bytes (SI suffixes allowed)
    --stack-size n    limit the stack size to 'n' bytes (SI suffixes allowed)
    --no-unhandled-rejection  ignore unhandled promise rejections
-s                    strip all the debug info
    --strip-source    strip the source code
-q  --quit         just instantiate the interpreter and quit

 

[debug] Command-line config: ['-v']
[debug] User config "C:\Documents and Settings\Nico\Application Data\yt-dlp\config.txt": ['--rm-cache-dir', '--console-title', '--js-runtimes', 'quickjs', '--add-metadata', '--embed-thumbnail', '--convert-thumbnails', 'jpg', '--ppa', 'ffmpeg:-metadata synopsis=""', '-o', '~/Bureaublad/%(title)s.%(ext)s', '--sponsorblock-remove', 'all', '-N', '6']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out cp1252 (No VT), error cp1252 (No VT), screen cp1252 (No VT)
[debug] yt-dlp version local@2025.10.27 [937b84ddb] (win_x86_exe)
[debug] Python 3.11.4 (CPython x86 32bit) - Windows-XP-5.1.2600-SP3 (OpenSSL 3.5.2 5 Aug 2025)
[debug] exe versions: ffmpeg N-121254-g635cb4543f (fdk,setts), ffprobe N-121254-g635cb4543f, phantomjs 1.9.8
[debug] Optional libraries: Cryptodome-3.23.0, brotli-1.1.0, certifi-2025.10.05, mutagen-1.47.0, requests-2.32.5, sqlite3-3.50.4, urllib3-2.5.0, websockets-15.0.1, yt_dlp_ejs-0.2.1
[debug] JS runtimes: quickjs-2025-09-13
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Plugin directories: none
[debug] Loaded 1839 extractors
Removing cache dir C:\Documents and Settings\Nico/.cache\yt-dlp ...

 

Edited by nicolaasjan

1 hour ago, VistaLover said:

FWIW, I don't like adding stuff to PATH unless I can't do otherwise

I have no issues adding things to the PATH.

Everything needed goes in `C:\Bin`.

So, on XP my PATH looks like this:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Bin;C:\Python311;C:\Python311\Scripts

 

Edited by nicolaasjan

I had to downgrade to PyInstaller 5.13.2, instead of using PyInstaller 6.16.0 for XP from 3dyd...

I got a nasty error when launching the `onedir` build.

yt-dlp said:

[PYI-1228:ERROR] Failed to load Python DLL 'C:\bin\_internal\python311.dll'.
LoadLibrary: Kan opgegeven procedure niet vinden.

(can't find procedure)

 

spacer.png

See Issue 2.

 

Or you could copy a Psapi.dll with that API (Vista/ROS/Wine/KernelEx) to the local directory.

Patching might be the best option -- this is one case where dropping the "Ex" from the end actually works (same three parameters). Using a hex editor, change "QueryWorkingSetEx" to "QueryWorkingSet" by replacing the "Ex" with two nulls.

 

Detailed explanation of this issue on WinXP SP3:

https://github.com/3dyd/pyinstaller-builds/issues/2#issuecomment-3464525813

Excerpt form PyInst-6.0.0 documentation: 

https://pyinstaller.org/en/v6.0.0/CHANGES.html#incompatible-changes

Quote

All of onedir build’s contents except for the executable are now moved into a sub-directory (called _internal by default). sys._MEIPASS is adjusted to point to this _internal directory. The breaking implications for this are:

    Assumptions that os.path.dirname(sys.executable) == sys._MEIPASS will break. Code locating application resources using os.path.dirname(sys.executable) should be adjusted to use __file__ or sys._MEIPASS and any code locating the original executable using sys._MEIPASS should use sys.executable directly.

    Any custom post processing steps (either in the .spec file or externally) which modify the bundle will likely need adjusting to accommodate the new directory. (#7713)

The psapi.dll in question (with the missing function) is the system one, while the one inside the "_internal" dir (which isn't being loaded when PyInst-6.16.0-xpmod has been used) is PSAPI.DLL, one of the four wrapper DLLs (kernelXP.dll, ntextl.dll, psapi.dll, ws2_xx.dll) that are used to backport py3.11.4 to XP ...

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.