For tomorrow’s post Ookla speedtest CLI for Windows has some undocumented arguments to accept license and GDPR I neede the full path to the speedtest.exe which I had installed using Chocolatey.
I know chocolatey uses a shim that redirects to the actual executable, so a simple where speedtest.exe
would not cut it.
My guess would be that the generated shim allowed to either get the target pathname out, or have the target pathname encoded in it.
Luckily the first applies: a few of the shim command-line parameters are in [Wayback/Archive] Chocolatey Software Docs | Executable shimming (like symlinks but better):
You pass these arguments to an executable that is a shim (e.g. executables in the bin directory of your Chocolatey install, not choco.exe):
--shimgen-help
– shows this help menu and exits without running the target
--shimgen-log
– logging is shown on command line
--shimgen-waitforexit
– explicitly tell the shim to wait for target to exit – useful when something is calling a gui and wanting to block – command line programs explicitly have waitforexit already set.
--shimgen-exit
– explicitly tell the shim to exit immediately.
--shimgen-gui
– explicitly behave as if the target is a GUI application. This is helpful in situations where the package did not have a proper .gui file.
--shimgen-usetargetworkingdirectory
– set the working directory to the target path. Useful when programs need to be running from where they are located (usually indicates programs that have issues being run globally).
--shimgen-noop
– Do not actually call the target. Useful to see what would happen if you ran the command.
But the below dumps show more more (using [Wayback/Archive] Strings – Windows Sysinternals | Microsoft Docs, [Wayback/Archive] clip | Microsoft Docs and post-processing in [Wayback/Archive] Notepad++).
Back to the second solution,
strings C:\ProgramData\chocolatey\bin\speedtest.exe | findstr speedtest.exe
showed
speedtest.exe
..\\lib\speedtest\tools\speedtest.exe
Cannot find file at '..\\lib\speedtest\tools\speedtest.exe' (
speedtest.exe
speedtest.exe
And towards the first,
strings C:\ProgramData\chocolatey\bin\speedtest.exe | clip
resulted in this fragment:
Read the rest of this entry »