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,262 other subscribers

Archive for the ‘Windows Development’ Category

When Microsoft download URLs time out: check if it other IP addresses for the same host do work fine (it might be a regional Microsoft CDN issue)

Posted by jpluimers on 2024/03/28

A while back, early in the Wednesday morning after Patch Tuesday I performed regular updates of all the systems noticing some updates failed because timeouts on the Microsoft download servers.

Note I perform the manual steps on Wednesday as Patch Tuesday as it starts at 10:00 AM PST which is in the evening in Amsterdam. The automated steps are automated and kick in when Microsoft tells the Windows machines to update themselves.

See [Wayback/Archive] Security Update Guide FAQs

Microsoft schedules the release of security updates on “Patch Tuesday,” the second Tuesday of each month at 10:00 AM PST.

Depending on time zone(s) in which the organization operates, IT pros should plan their deployment schedules accordingly. Please note that there are some products that do not follow the Patch Tuesday schedule.

I posted a gist and a Tweet, but didn’t immediately thought of a good resolution so I postponed that until Thursday and found it:

Read the rest of this entry »

Posted in C, C++, Development, Power User, Software Development, Visual Studio and tools, Visual Studio C++, vscode Visual Studio Code, Windows, Windows Development | Leave a Comment »

My Ultimate PowerShell prompt with Oh My Posh and the Windows Terminal – Scott Hanselman’s Blog

Posted by jpluimers on 2024/03/21

Via [Archive.is] Kevin on Twitter: “Gotta say this looks amazing and I actually didn’t know you can customize the command line on Windows this far. Read this blogpost by @shanselman , highly recommended. 👇 “

For my link archive: [Wayback] My Ultimate PowerShell prompt with Oh My Posh and the Windows Terminal – Scott Hanselman’s Blog

Read the rest of this entry »

Posted in CommandLine, Development, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows, Windows 10, Windows Development | 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 »

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 »

I dug into scoop a tiny bit: some thoughts and links

Posted by jpluimers on 2023/05/09

Last month, I wrote Need to take a look a Scoop (as a long time Chocolatey user).

So I did, and started with a list of my Chocolatey installs grouped by functionality in order to expand the table towards winget and [Wayback/ArchiveGitHub – ScoopInstaller/Scoop: A command-line installer for Windows.

This was a good way to start learning, and by already doing this, got learned this:

  • Whereas Chocolaty has a global searchable community package index at [Wayback/Archive] Chocolatey Software | Packages  which is moderated too.
  • Scoops works differently. There are many buckets you can get your applications from, and there is no Scoop maintained index of them.

Let’s focus on the latter for a bit:

From the above, I got a feeling that Scoop is way more like the Linux Package Managers than WinGet and Chocolatey are.

–jeroen

Read the rest of this entry »

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