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 1,862 other subscribers

Archive for the ‘Windows’ Category

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 »

Windows 10: whitelisting domains so updates still work

Posted by jpluimers on 2023/09/08

The internet access for my mentally retarded brother is fully based on whitelists.

It’s a simple reasoning: his mental abilities is basically a fixed box that does not grow. If he gains one part, he loses on another part.

This makes his risks assessments low and unpredictable at best, especially on the rapidly changing internet, hence whitelisting at the router level.

Whitelisting also implicates I need to update the ever changing list of domains that Windows 10 uses to keep newer versions up-to-date.

If you don’t, then you get an error [Wayback] 0xc1900223 while searching for or a applying updates. The description of that error isn’t accurate; what it actually means is that your computer cannot connect to one or more of the many update locations.

These links should help finding the ones for newer Windows versions (at the time of writing, there was no documentation for Windows 10 21H1 or newer):

Maybe one day someone makes an overview of these in one big worksheet to easily spot the differences. Until then it is a trial and error process every 6 months or so.

Related: [Archive.is] Jeroen Wiert Pluimers on Twitter: “Anyone knows when the 21H1 update of these instructions will be available?  Need to update the site of my mentally retarded brother. Maybe @shanselman or @JenMsft can help me get in touch with the right people for this?”

–jeroen

Posted in Power User, Windows, Windows 10 | 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 »

.NET/C#: Small command-line tool to query REST JSON results from a batch file.

Posted by jpluimers on 2023/08/29

Often the power is in the combinations of tools.

Read until the epilogue…

Prologue

In this case, I needed to be able to query the JSON results of calls to REST services from the command-line so I could process them in Batch files.

Since I could not find anything readily available, I originally Originally I opted for the PowerShell command-line scripting tool, as that ships with recent Windows versions and can re-use anything that .NET brings. But though [Wayback/Archive] .NET has built in JSON serialization support, there is [Wayback/Archive] no querying support in it.

Then I thought about Delphi, as it [Wayback/Archive] too has a built-in JSON parser, but even the well known [Wayback/Archive] JSON SuperObject library has no query support.

Back to .NET, which – like Delphi – has a well known and respected third party JSON library as well: [Wayback/Archive] NewtonSoft JSON aka JSON.net and that one [Wayback/Archive] does have support for querying JSON with the SelectToken function.

That’s the fundament of the rest of this article, with the potential to be used in a cross-platform as well.

So no need for a plan B.

Read the rest of this entry »

Posted in *nix, *nix-tools, .NET, Batch-Files, Conference Topics, Conferences, Development, Event, JavaScript/ECMAScript, jq, JSON, Power User, Scripting, Software Development, Windows, Windows Development | Leave a Comment »

Troubleshoot black screen or blank screen errors

Posted by jpluimers on 2023/08/08

Via Jan Gentleman, I learned

  • about the Ctrl+⇧ Shift+⊞ Win+B shortcut on Windows 10 and 11 that restarts starts video driver
  • that documentation is in [Wayback/Archive] Troubleshoot black screen or blank screen errors as

    Action 1: Try a Windows Key sequence to wake the screen.

    If you’re using a device with a keyboard connected to it, select Windows logo key Ctrl Shift B. If you’re in tablet mode, press the volume-up and volume-down buttons simultaneously three times within two seconds. If Windows is responsive, a short beep will sound and the screen will blink or dim while Windows attempts to refresh the screen.

Via:

 

Later I found out it also is in Table of keyboard shortcuts – Wikipedia: General shortcuts

Restart Video Driver Windows 10: Ctrl+⇧ Shift+⊞ Win+B[2][3]

Also I learned how people order the modifier keys is varying.

–jeroen

Posted in .NET, Development, Power User, Software Development, Visual Studio and tools, Windows, Windows 10, Windows 11 | Leave a Comment »

I missed that the `choco list –localonly` had become default in 2015…

Posted by jpluimers on 2023/07/28

and when upgrading to Chocolatey to version 2, I got this error:

Invalid argument --localonly. This argument has been removed from the list command and cannot be used.

The upgrade broke a small batch file choco-list-installed.bat that I run on a lot of systems including both old and new chocolatey installations some dating back to before 2015 having this simple content:

choco list --localonly

Read the rest of this entry »

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

Different ways for installing Windows features on the command line – Peter Hahndorf

Posted by jpluimers on 2023/06/02

If course you can configure Windows Optional Features using the GUI as for instance explained at [Wayback/Archive] How to manage Windows 10’s many ‘optional features | Windows Central.

However, I prefer command-line management.

About the only post doing the comparison of command-line mangement options I could find about is [Wayback/Archive] Different ways for installing Windows features on the command line – Peter Hahndorf and hopefully will be further updated in the future. It is dated 2015, but has been updated until at least Windows Server Nano.

I added one, and then rewrote the tool-set availability table in the post into this:

Read the rest of this entry »

Posted in Communications Development, Development, Internet protocol suite, Microsoft Store, OpenSSH, Power User, SSH, TCP, Windows, Windows 10, Windows 11, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Windows Vista | Leave a Comment »

Install apps with the WinAppDeployCmd.exe tool – UWP applications | Microsoft Docs

Posted by jpluimers on 2023/05/29

Since winget is only available as of Windows 10 version 2004, [Wayback/Archive] Install apps with the WinAppDeployCmd.exe tool – UWP applications | Microsoft Docs as an alternative.

Related:

–jeroen

Posted in Power User, Windows, Windows 10, Windows 11, Windows 8.1, winget | Leave a Comment »

Installing the Microsoft Store version of Windows Terminal via the winget command-line

Posted by jpluimers on 2023/05/26

In the continuing series of Chocolatey/Scoop/winget related posts, this one is about Windows Terminal.

There are basically two ultimate sources you can install it from:

You can configure the Microsoft Store to automatically install updates as per [Wayback/Archive] Turn on automatic app updates (on my system this was the default):

Microsoft Store - Auto-Updates is turned on by default

Microsoft Store – Auto-Updates is turned on by default

  1. Select the Start ⊞ screen, then select Microsoft Store.
  2. In Microsoft Store at the upper right, select the account menu (the three dots) and then select Settings.
  3. Under App updates, set Update apps automatically to On.

As a backgrounder, here some articles on Windows Terminal, ConPTY and the Windows Console from the [Wayback/Archive] DevBlogs – Microsoft Developer Blogs:

  1. [Wayback/Archive] Windows Command-Line: Backgrounder | Windows Command Line Tools For Developers
  2. [Wayback/Archive] Windows Command-Line: The Evolution of the Windows Command-Line | Windows Command Line
  3. [Wayback/Archive] Windows Command-Line: Inside the Windows Console | Windows Command Line
  4. [Wayback/Archive] Windows Command-Line: Introducing the Windows Pseudo Console (ConPTY) | Windows Command Line
  5. [Wayback/Archive] Windows Command-Line: Unicode and UTF-8 Output Text Buffer | Windows Command Line

More on (pseudo)terminals in general containing [Wayback/Archive] “ConPTY” – Search results – Wikipedia:

More on using the Windows Terminal:

My related blog posts:

–jeroen

Posted in Chocolatey, ConPTY, Microsoft Store, Power User, Scoop, Windows, Windows Terminal, winget | Leave a Comment »

Windows 10 and 11: installing WSL2 does not require winget, Chocolatey or Scoop

Posted by jpluimers on 2023/05/18

After using Chocolatey for a long time and writing about it, I have written a few articles on other Windows package managers like winget and Scoop.

Part of the reason was that I wanted to install new systems in a semi-automatic way including WSL2 (Windows Subsystem for Linux 2).

As I have spent quite some time getting treated against metastasised rectum cancer, I missed part of the evolvement of WSL into WSL2 and of the winget evolvement.

The good news is that this simplified the scripted installation of WSL2 a lot, as over time, this got very easy, as confirmed in these posts/messages I found via [Wayback/Archive] winget wsl2 – Google Search:

I even found back this was announced when I was still in hospital: during the Build 2020 conference. A summary is at [Wayback/Archive] The Windows Subsystem for Linux BUILD 2020 Summary – Windows Command Line describing the introduction of wsl.exe --install and that it defaults to install WSL 2 as back-then already most Windows Insider build users using WSL had switched from WSL 1 to WSL 2.

Back to installing

Yesterday, in  Windows “equivalents” for bash backticks in cmd and PowerShell, I showed how to get the wsl.exe information:

C:\temp>PowerShell -Command "SigCheck "$((Get-Command -CommandType Application wsl).Path)""

Sigcheck v2.82 - File version and signature viewer
Copyright (C) 2004-2021 Mark Russinovich
Sysinternals - www.sysinternals.com

c:\windows\system32\wsl.exe:
        Verified:       Signed
        Signing date:   09:24 15/10/2021
        Publisher:      Microsoft Windows
        Company:        Microsoft Corporation
        Description:    Microsoft Windows Subsystem for Linux Launcher
        Product:        Microsoft« Windows« Operating System
        Prod version:   10.0.19041.1320
        File version:   10.0.19041.1320 (WinBuild.160101.0800)
        MachineType:    64-bit

This was on one of my Windows 10 systems with version 21H2.

The installation progress was as follows and took ome 3 minutes on a 50 Mibit/s fiber connection:

C:\temp>wsl.exe --install
Installing: Virtual Machine Platform
Virtual Machine Platform has been installed.
Installing: Windows Subsystem for Linux
Windows Subsystem for Linux has been installed.
Downloading: WSL Kernel
Installing: WSL Kernel
WSL Kernel has been installed.
Downloading: Ubuntu
The requested operation is successful. Changes will not be effective until the system is rebooted.

Time to play around (:

–jeroen

Posted in Batch-Files, Chocolatey, Development, Power User, Scoop, Scripting, Software Development, Windows, Windows Development, winget, WSL Windows Subsystem for Linux | Leave a Comment »