The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,267 other subscribers

Archive for the ‘Chocolatey’ Category

Use Remembered Arguments for a Package During Upgrades · Issue #797 · chocolatey/choco

Posted by jpluimers on 2024/03/06

I totally missed this feature got implemented: [Wayback/Archive] Use Remembered Arguments for a Package During Upgrades · Issue #797 · chocolatey/choco. I also seem to be lucky I have not tried it out yet (:

I bumped into it via [Wayback/Archive] Chocolatey Software | Notepad++ 8.4.4, which had this interesting comment:

If you want Notepad++ 32 bit and you want it to stay on 32 bit with upgrades, ensure you are on Chocolatey 0.10.4 (or newer). Then add `-x86` to your installation arguments. Then turn on the remembered arguments feature with ‘choco feature enable -n useRememberedArgumentsForUpgrades‘ – this will ensure that `-x86` gets passed on upgrade when running `choco upgrade all`. For more information on how this works, see https://github.com/chocolat…797

First of all, if you started using Chocolatey at or before 0.14, the useRememberedArgumentsForUpgrades feature is disabled by default and kept that way even after upgrading to the most recent version. You can see executing choco feature list on a system that started with Chocolatey:

Read the rest of this entry »

Posted in Chocolatey, Development, Power User, Scripting, Software Development, Windows | Leave a Comment »

Ookla speedtest CLI for Windows has some undocumented arguments to accept license and GDPR

Posted by jpluimers on 2023/10/11

I had speedtest-cli running on MacOS and various Linux machines, but not yet on Windows (see for instance my post Ubuntu: Fixing the myserious “Failed to stop apt-daily.timer: Connection timed out”).

[Wayback/Archive] Install and Test Internet Speed with Speedtest CLI Command Line – NEXTOFWINDOWS.COM reminded me there is a Speedtest CLI for Windows download at at [Wayback/Archive] Speedtest CLI: Internet speed test for the command line, but I am a an automation/scripting/devops person, so luckily there are also [Wayback/Archive] Chocolatey Software | Speedtest by Ookla (don’t get [Wayback/Archive] Ookla.Speedtest download, as that is the GUI version).

Both the Chocolatey and winget packages are named the same, so that is quite confusing. This is how I have set them apart:

Read the rest of this entry »

Posted in *nix, *nix-tools, Batch-Files, Chocolatey, DevOps, GDPR/DS-GVO/AVG, Internet, ISP, KPN, Notepad++, Power User, Privacy, Scripting, SpeedTest, Windows, xs4all | 2 Comments »

Getting the Chocolatey shimgen generated shim target

Posted by jpluimers on 2023/10/10

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 »

Posted in Batch-Files, Chocolatey, CommandLine, Development, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows | Leave a Comment »

Seams I might in part be the cause of (#3186) Remove easter egg “You are smarter than the average bear …” by pauby · Pull Request #3276 · chocolatey/choco

Posted by jpluimers on 2023/09/11

Only having really learned to speak English starting in my late teens, I never got the “smarter than the average bear” reference, so I filed what I thought was a bug early 2019: [Wayback/Archive] “You must be smarter than the average bear…” after upgrading to 7zip.install v18.6 and notepadplusplus.install v7.6.2 · Issue #1700 · chocolatey/choco which last year got this useful comment

I had this for several packages now, since I am updating them daily.
I am assuming there is a way to remove versions, which leads to this error until there is a new update.

It was confirmed this summer from

I’m smarter than the average bear at least once or twice a month. I think it might be packages which are pulled back and you happen to have installed that version

The bug got referenced this summer from [Wayback/Archive] Remove warning message about “smarter than the average bear” · Issue #3186 · chocolatey/choco.

This in turn lead to [Wayback/Archive] (#3186) Remove easter egg “You are smarter than the average bear …” by pauby · Pull Request #3276 · chocolatey/choco

That made me realise that for large groups of English speaking people “smarter than the average bear” would actually be a well known thing.

So I searched and learned a thing or two:

Read the rest of this entry »

Posted in .NET, Chocolatey, CommandLine, Development, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows | Leave a Comment »

Installing the Microsoft To Do app from the Microsoft Store on Windows via the CLI was impossible at first, and requires GUI configuration

Posted by jpluimers on 2023/09/07

I prefer installing applications through the CLI (command-line interface). This way, things can be scripted and installation parameters be stored under version control.

A few months back I published Different ways for installing Windows features on the command line – Peter Hahndorf which wrote way earlier and amended with a few highlights I learned from unsuccessfully trying to Microsoft To Do. Of course that is possible from the GUI by following these links:

  1. [Wayback/Archive] To Do List and Task Management App | Microsoft To Do
  2. [Wayback/Archive] Get Microsoft To Do: Lists, Tasks & Reminders – Microsoft Store

But I don’t want GUI, I want CLI as that is way easier to automate than GUI. I knew this should theoretically be possible from my the above winget post.

Putting this to practice however at first failed. Later I found a GUI-based workaround. So this was not possible purely on the CLI.

This post is both a summary of the most important bits and a reminder for myself to check if installing Microsoft Store via [Wayback/Archive] Winget without a Microsoft Store account is still impossible (as when downloading via the GUI from the Microsoft Store site an account is not needed).

winget

First however on how I ended up at winget for anyway were these posts:

Read the rest of this entry »

Posted in Chocolatey, Microsoft Store, Power User, Windows, Windows 10, Windows 11, winget | Leave a Comment »