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

Getting the human readable Windows 10 version from the registry (via Super User)

Posted by jpluimers on 2023/05/15

[Wayback/Archive] powershell – How to get the windows version with command line? – Super User (thanks [Wayback/Archive] harrymc!)

The value can be found under registry key Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion inside the value named DisplayVersion.
The following PowerShell command will get it:
(Get-Item "HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion").GetValue('DisplayVersion')
This seems to have been introduced in version 2004 (20H1).

–jeroen

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

Disabling the Windows 10 news (and weather) feeds

Posted by jpluimers on 2023/05/11

I finally got annoyed enough to figure out how to disable the Windows 10 news (and weather) feeds.

At first I thought the solution in this post worked for Windows 11 as well, but re-testing in Windows 11 it does not or does not (or not any more: given so many new Windows 11 releases with ever changing functionality I’m not surprised).

Disable Windows news feeds for current user

Failure: just disabling the news feed will automatically get it reset by explorer.exe

Based on the below sources, I made this small batch file:

Read the rest of this entry »

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

Restart Windows explorer with an UAC administrator token

Posted by jpluimers on 2023/05/10

Sometimes, you want to restart the Windows explorer. This is already an exception case which you want to do when explorer hangs (for instance when taskbar icons do not respond any more), or has files locked which need to be modified. I described the latter in Inno Setup: Program Folder not showing up In Start > All Programs , with this very simple restart script:

taskkill /F /IM explorer.exe
start explorer

Even more exception is wanting to run explorer with a UAC elevated administrative token. I sometimes do this when moving around stuff from other users on the same computer without having them logged on (as that would lock the files or directories to be moved around).

The risk of running explorer under UAC elevation, is that any program you start will also start UAC elevated, so beware what you ask for…

This is how you start explorer under UAC elevation:

pwsh.exe -nol -noni -nop -w hidden -c "taskkill /f /im explorer.exe; start explorer -v runas -a /nouaccheck"

or if you run an older Windows version of PowerShell:

PowerShell.exe -nol -noni -nop -w hidden -c "taskkill /f /im explorer.exe; start explorer -v runas -a /nouaccheck"

These command-line options and verbs are used:

Time to explain a few:

Read the rest of this entry »

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

Need to rethink which Windows package managers to use

Posted by jpluimers on 2023/04/24

Triggered by last week’s post Need to take a look a Scoop (as a long time Chocolatey user), I need to re-think which Windows package managers to use and in what order.

Basically there are two challenges:

  • User level (scoop) versus system level (winget and chocolatey) installations
  • Availability of packages in each package manager

Since I hardly used winget, I need to get started at Windows Package Manager – Wikipedia.

A good example of unavailability is at [Wayback/Archive] Scott’s Ultimate Tools via Winget – DVLUP (which has the ID values for winget or chocolatey of [Wayback/Archive] Scott Hanselman’s 2021 Ultimate Developer and Power Users Tool List for Windows – Scott Hanselman’s Blog)

–jeroen

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

Towards a work setup on a hardened host and doing everything in VMs

Posted by jpluimers on 2023/04/21

SwiftOnSecurity posted this interesting tweet in 2021: [Archive] SwiftOnSecurity on Twitter: “Lenovo P1 Gen3 with 12core Xeon, 64GB RAM, two 1TB M.2 SSDs. Running Windows Server 2022 with the Hyper-V role. All hardening applied to host OS, almost nothing happens here except managing guest VMs. On the second SSD I then have Win10 VMs joined to the corporate domain.” / Twitter.

I wonder if a similar setup can be done using an Apple M1 based machine as host and running all work in virtual machines.

Swift had some issues getting cameras and microphones to work: [Archive] SwiftOnSecurity on Twitter: “The problem here is Teams. If I want to pass through my webcam and microphone that could get a bit dicey, despite HyperV Enhanced Session being essentially an RDP session. For now I’m using my phone for Teams microphone. Also I’m not sure how well thermal management will work….” / Twitter

This resulted in some answers and interesting links:

Some more interesting tweets in that thread:

–jeroen

Posted in Apple, M1 Mac, Mac, Power User, Windows | Leave a Comment »

Need to take a look a Scoop (as a long time Chocolatey user)

Posted by jpluimers on 2023/04/06

Based on

So:

Related blog posts:

–jeroen

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

Need to take a look a Scaleway

Posted by jpluimers on 2023/04/05

Based on

I need to take a look at Scaleway, at least at thee links via [Wayback/Archive] scaleway instance – Google Search:

Related blog post: Dave Anderson on Twitter: “Cool minor @Tailscale moment: I’m recommissioning a server that got moved from a different network, so all its network config was wrong, and generally I couldn’t get at it over the network, only IPKVM console. But then my ping over Tailscale started working?!” / Twitter

–jeroen

Posted in Cloud, Infrastructure, Power User, Scaleway, Scoop, Windows | 1 Comment »

Dave Anderson on Twitter: “Cool minor @Tailscale moment: I’m recommissioning a server that got moved from a different network, so all its network config was wrong, and generally I couldn’t get at it over the network, only IPKVM console. But then my `ping` over Tailscale started working?!” / Twitter

Posted by jpluimers on 2023/04/04

Wow, I wrote about Tailscale a few times before, and it is still on my research list, but this is a very compelling reason to use it. [Archive] Dave Anderson on Twitter: “Cool minor @Tailscale moment: I’m recommissioning a server that got moved from a different network, so all its network config was wrong, and generally I couldn’t get at it over the network, only IPKVM console. But then my ping over Tailscale started working?!” / Twitter

I archived the thread so it becomes easier to read: [Wayback/Archive] A readable Thread by @dave_universetf Says Cool minor @Tailscale moment: I’ – UnrollThread.com.

The core are these three tweets:

Turns out, IPv6 autoconfiguration is what happened. Sure, v4 configuration was entirely wrong (it was trying to connect to wifi, via a wifi dongle that was no longer installed, and wanted to talk to a DNS server that doesn’t exist any more), but eno1 had a cable plugged in!
The server noticed IPv6 router advertisements, went “I’ll have some of that”, and got global IPv6 connectivity automagically. IPv4 and DNS were still down though, so all it had at this point is the ability to send/receive IPv6 packets.
So, how did Tailscale get from there to a working setup? It still needs to contact https://t.co/hEs4S8qvTw to get a network map, and still needs to talk to DERP servers to get p2p tunnels working outside the LAN. Enter bootstrap DNS!

It means I have to re-read Source: Some links on Tailscale / Wiregard, especially the [WaybackHow Tailscale works · Tailscale bit, then decide how I want to organise my infrastructure to run parts under Tailscale (I have the impression it is a peer based set-up, not router based).

Then I have to read [Wayback/Archive] IPv4, IPv6, and a sudden change in attitude – apenwarr of which the conclusion is this:

IP mobility is what we do, in a small way, with Tailscale’s WireGuard connections. We try all your Internet links, IPv4 and IPv6, UDP and TCP, relayed and peer-to-peer. We made mobile IP a real thing, if only on your private network for now. And what do you know, the math works. Tailscale’s use of WireGuard with two networks is more reliable than with one network.

Finally I need to not just read it, but understand all it (:

Or maybe I should ask Kris, as I got here through:

I saved Kris’ message thread here at [Wayback/Archive] Thread by @isotopp on Thread Reader App – Thread Reader App.

An OK translation is at [Wayback/Archive] Thread by @isotopp on Thread Reader App – Thread Reader App.

–jeroen

Posted in Hardware, Network-and-equipment, Power User, Scoop, Tailscale, VPN, Windows, Wireguard | 1 Comment »

Installing Windows OpenSSH from the command-line on Windows 10 and 11

Posted by jpluimers on 2023/03/28

While writing On my reading list: Windows Console and PTY, I found out that OpenSSH had become available as an optional Windows feature.

It was in [Wayback/Archive.is] Windows Command-Line: Introducing the Windows Pseudo Console (ConPTY) | Windows Command Line:

Thankfully, OpenSSH was recently ported to Windows and added as a Windows 10 optional feature. PowerShell Core has also adopted ssh as one of its supported PowerShell Core Remoting protocols.

Here are a few links:

Read the rest of this entry »

Posted in *nix, *nix-tools, Communications Development, ConPTY, Console (command prompt window), Development, Internet protocol suite, OpenSSH, Power User, SSH, ssh/sshd, TCP, Windows, Windows 10, Windows 11 | Leave a Comment »