[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. “:
Archive for the ‘Windows’ Category
Working around Windows 10 upgrade 21H2 suddenly requiring 20+GBytes instead of 10+.
Posted by jpluimers on 2023/10/30
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 %* SHA1sha256.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:
- [Wayback/Archive] tedr2 for answering [Wayback/Archive] Is there a built-in checksum utility on Windows 7? – Super User:
CertUtil is a pre-installed Windows utility, that can be used to generate hash checksums:certUtil -hashfile pathToFileToCheck [HashAlgorithm]HashAlgorithm choices: MD2 MD4 MD5 SHA1 SHA256 SHA384 SHA512So for example, the following generates an MD5 checksum for the fileC:\TEMP\MyDataFile.img:CertUtil -hashfile C:\TEMP\MyDataFile.img MD5Original solution by Laisvis Lingvevicius
To check if the hash is correct, you can use this Powershell one-liner:if ( $($(CertUtil -hashfile C:\TEMP\MyDataFile.img MD5)[1] -replace " ","") -eq "your_hash" ) { echo "ok" } - [Wayback/Archive] Christian Long for answering [Wayback/Archive] hashing – Is there a built-in checksum utility on Windows 7? – Super User:
powershell get-filehash -algorithm md5 <file_to_check>
–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:
- [WayBack] windows registry – Invalid key name for REG ADD on some PCs – Super User
- [WayBack] Delete Registry key from command line
–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:
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:
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
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:
- [Wayback] Is anyone using Windows Defender Controlled folder access? – Page 4 – Windows 10 Forums explaining the below Event Viewer (eventvwr.exe) custom view:
<QueryList> <Query Id="0" Path="Microsoft-Windows-Windows Defender/Operational"> <Select Path="Microsoft-Windows-Windows Defender/Operational">*[System[(EventID=1123 or EventID=1124 or EventID=5007)]]</Select> <Select Path="Microsoft-Windows-Windows Defender/WHC">*[System[(EventID=1123 or EventID=1124 or EventID=5007)]]</Select> </Query> </QueryList>
- [Wayback] Protect important folders from ransomware from encrypting your files with controlled folder access | Microsoft Docs
The following table shows events related to controlled folder access:
REVIEW CONTROLLED FOLDER ACCESS EVENTS IN WINDOWS EVENT VIEWER Event ID Description 5007Event when settings are changed 1124Audited controlled folder access event 1123Blocked controlled folder access event - [Wayback] View attack surface reduction events | Microsoft Docs
This is the place in the Settings where you can enable the Controlled Folder Access feature:
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:
Posted in Batch-Files, Development, Microsoft Store, Power User, PowerShell, Scripting, Software Development, Windows, Windows 10, Windows 11 | 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:
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.
- [Wayback] Get help with Windows 10 upgrade and installation errors states:
Error What it means and how to fix it 0xc1900223 This indicates that there was a problem downloading and installing the selected update. Windows Update will try again later and there is nothing you need to do at this time.
- [Wayback] 20H2 Feature Update Error 0xc1900223 – Microsoft Q&A is more helpful:
The error 0xc1900223 may occur if your computer is unable to connect to the Microsoft Update servers or its content delivery network.
- [Wayback] Fix Error 0xc1900223 When Installing Windows 10 Updates » Winhelponline has a smart alternative that also makes updating a lot faster doing a major update (bit not minor updates):
Visit the Microsoft Windows 10 Download site. [Wayback]
- In my experience installing from an ISO image is often even faster (especially for updating one or many virtual machines) than with the “Windows 10 Upgrade” tool or “Media Creation Tool”. Force downloading Windows 10 ISOs instead of Media Creation Tool describes how.
- [Archive.is] How to troubleshoot Windows Update Error 0xc1900223? – Auslogics blog goes a lot deeper into the matter and (besides connection issues) also covers broken Windows Updater configurations.
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):
- [Wayback] Windows 10, version 20H2, connection endpoints for non-Enterprise editions – Windows Privacy | Microsoft Docs
- [Wayback] Windows 10, version 2004, connection endpoints for non-Enterprise editions – Windows Privacy | Microsoft Docs
- [Wayback] Windows 10, version 1909, connection endpoints for non-Enterprise editions – Windows Privacy | Microsoft Docs
- [Wayback] Windows 10, version 1903, connection endpoints for non-Enterprise editions – Windows Privacy | Microsoft Docs
- [Wayback] Windows 10, version 1809, connection endpoints for non-Enterprise editions – Windows Privacy | Microsoft Docs
- [Wayback] Windows 10, version 1803, connection endpoints for non-Enterprise editions – Windows Privacy | Microsoft Docs
- [Wayback] Windows 10, version 1709, connection endpoints for non-Enterprise editions – Windows Privacy | Microsoft Docs
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 »





