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

Avoid VirtualBox; use Hyper-V or VMware in stead

Posted by jpluimers on 2023/11/10

A while ago, Jilles found out why not to use VirtualBox: [Wayback/Archive] Jilles🏳️‍🌈 on Twitter: “@jpluimers Ik wil op basis van wat de Arch community schreeuwt; “Virtualbox is stom, als je geen hyper-v gebruikt vraag je om problemen”, HYPER-V maar gaan proberen.” / Twitter

The biggest problem is that VirtualBox seems to be developed ant tested for the happy path, not the failing path.

Which means that when you use it for less common scenarios, it will often fail in mysterious ways.

Back in Running ArchiveTeam Warrior version 3.2 on ESXi, I already mentioned this:

Totally agreeing with Kristian Kohntopp, I do not understand why people use VirtualBox at all: I just run in too much issues like [Archive.is] Kristian Köhntopp on Twitter: “Hint: Wenn die Installation einer Linux-Distro in Virtualbox mit wechselnden, unbekannten Fehlern scheitert, hilft es, stattdessen einmal VMware Workstation oder kvm zu probieren. In meinem Fall hat es dann *jedes* *einzelne* *Mal* mit *demselben* Iso geklappt.”.

Read the rest of this entry »

Posted in *nix, *nix-tools, ArchiveTeamWarrior, Hyper-V, InternetArchive, Linux, Power User, VirtualBox, Virtualization, VMware, WayBack machine, Windows, Windows 10, Windows 11 | 1 Comment »

Formatting a USB stick larger than 32 gigabyte with FAT32 on Windows 10

Posted by jpluimers on 2023/11/03

Formatting USB sticks in Fat32 on Windows 10 can be a pain, especially when they are larger than 32 gigabyte.

Microsoft Windows [Version 10.0.19043.1081]
(c) Microsoft Corporation. All rights reserved.

C:\bin>format D: /FS:FAT32
Insert new disk for drive D:
and press ENTER when ready...
The type of the file system is EXFAT.
The new file system is FAT32.
Verifying 239.0 GB
The volume is too big for FAT32.
Format failed.

C:\bin>

This works:

Read the rest of this entry »

Posted in FAT (8-bitFAT, FAT12, FAT16, FAT16B, FAT32), Power User, Windows, Windows 10 | Leave a Comment »

Working around Windows 10 upgrade 21H2 suddenly requiring 20+GBytes instead of 10+.

Posted by jpluimers on 2023/10/30

[Wayback/Archive] Jeroen Wiert Pluimers on Twitter: “Hey @MicrosoftHelps, in the past @Windows 10 upgrades required around ~10Gbytes of free disk space. It now has increased to over 20Gbytes. @WindowsUpdate Why? This is not fun when upgrading a bunch of regression VMs. “:

Read the rest of this entry »

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

Forgot to blog: on Windows, use Certutil to Get File Hashes

Posted by jpluimers on 2023/10/19

I have had these two batch files on my system forever:

  • sha1.bat:
    :: https://superuser.com/questions/245775/is-there-a-built-in-checksum-utility-on-windows-7
    :: https://www.mcbsys.com/blog/2017/03/use-certutil-to-get-file-hash/
    :: Windows 7 has case sensitive Hash algorithms: MD2 MD4 MD5 SHA1 SHA256 SHA384 SHA512
    certUtil -hashfile %* SHA1
  • sha256.bat:
    :: https://superuser.com/questions/245775/is-there-a-built-in-checksum-utility-on-windows-7
    :: https://www.mcbsys.com/blog/2017/03/use-certutil-to-get-file-hash/
    :: Windows 7 has case sensitive Hash algorithms: MD2 MD4 MD5 SHA1 SHA256 SHA384 SHA512
    certUtil -hashfile %* SHA256

But I forgot to blog about [Wayback/Archive] Use Certutil to Get File Hash | MCB Systems mentioning:

on Windows 7, the hash algorithms are case-sensitive. Be sure to type, for example, “MD5”, not “md5”. On Windows 8.1 and 10, case doesn’t matter

I did mention the first link in “error: invalid object 100644” “git svn”, though only in a by-line. So thanks [Wayback/Archive] user64996 for asking and:

–jeroen

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

When reg.exe gives you “ERROR: Invalid key name.”

Posted by jpluimers on 2023/10/16

Be careful phrasing reg.exe commands.

Sometimes it gives you the error ERROR: Invalid key name.

The reason is that the reg.exe is really sensitive on the order of the command-line: the first argument must be a full key, optionally prepended by a computername.

Any other optional command-line option (like /f to force execution without asking) needs to go after that.

See:

–jeroen

Posted in Batch-Files, Power User, Registry Files, Scripting, 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 »

Jen Gentleman on Twitter: “Did you know that if you press CTRL + ALT + Tab then the ALT + Tab UI will stay open without you having to continue holding the keys down? 👀” / Twitter

Posted by jpluimers on 2023/09/25

[Wayback/Archive] Jen Gentleman 🌺 on Twitter: “Did you know that if you press CTRL + ALT + Tab then the ALT + Tab UI will stay open without you having to continue holding the keys down? 👀” / Twitter

I didn’t, so I suggested this:

[Wayback/Archive] Jeroen Wiert Pluimers on Twitter: “@JenMsft Works best if you do not use one single hand to press these keys at once.” / Twitter

–jeroen

Read the rest of this entry »

Posted in Keyboards and Keyboard Shortcuts, Power User, Windows, Windows 10, Windows 11 | Leave a Comment »

Figuring out the cause of “Controlled Folder Access” error messages.

Posted by jpluimers on 2023/09/13

Still need to investigate why every now and then Windows Remote Desktop causes this error:

C:\Windows\System32\mstsc.exe has been blocked from modifying %userprofile%\Documents\ by Controlled Folder Access.

Related links about EventID numbers 1123, 1124 and 5007:

This is the place in the Settings where you can enable the Controlled Folder Access feature:

Read the rest of this entry »

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

Microsoft Store: update all apps from the command-line

Posted by jpluimers on 2023/09/12

TL;DR

I have converted the below PowerShell one-liner into this batch file (the ^| syntax is to ensure the pipe runs within PowerShell, not within the batch file):

PowerShell 'Get-CimInstance -Namespace "Root\cimv2\mdm\dmmap" -ClassName "MDM_EnterpriseModernAppManagement_AppManagement01" ^| Invoke-CimMethod
 -MethodName UpdateScanMethod'

The why and how

Since I am a CLI person, and some Windows applications are only available on the Microsoft Store, I wanted to be able to initiate an update cycle from the command-line interface.

So I searched for [Wayback/Archive] microsoft store update all apps from the command-line – Google Search and found these to be valuable:

Read the rest of this entry »

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