Category Archives: Cool Tools

Appreciating Microsoft’s Update Ecosystem

As part of my daily Windows routine, I run the winget package manager to keep most of my applications up-to-date. Occasionally, I’ll also check in on the MS Store to see what it’s been finding and updating on its own. As the spirit moves me, I sometimes click the “Get updates” button to spur its actions along. I find myself appreciating Microsoft’s update ecosystem more and more (yes, even WU) as I work with it constantly. Let me explain…

Why I’m Appreciating Microsoft’s Update Ecosystem

The lead-in graphic shows an artfully arranged update view of MS Store’s Library tab, with three items “modified momens ago” in front. Behind, you see winget inside Windows Terminal/PowerShell working to install 8 different updates.

The amount of effort involved is pretty negligible, and the results are almost always trouble-free, speedy and reliable. Although I still have to turn to third-party tools to catch updates outside this ecosystem, under its umbrella things work pretty darn well.

Now, if only those other app makers would get on the manifest circuit and start offering packages for winget to use, life would be entirely peachy. But alas, life isn’t like that — especially here in Windows-World, where a certain amount of chasing one’s own tail is too often a necessary part of the daily grind.

But a WIMVP can always hope for a better future, right? Surely, someday it will all be completely automated and totally easy. Yeah, right: I’ll keep dreaming about it, but that’s the closest I’m sure I’ll ever get.

Facebooklinkedin
Facebooklinkedin

KB5031356 Error Calls for KIR

I just got an example of what makes Microsoft’s KIR, aka Known Issue Rollback, useful in the field. A recent story at WindowsLatest recites how an install KB503135  error calls for KIR. (This KB takes Windows 10 to Builds 19044.3570 or 19045.3570.) Some users are getting error code 0x8007000d along with a failed update. Because the problem is apparently of MIcrosoft’s making, they can use KIR to clean things up through WU by pushing an amended update.

When KB5031356 Error Calls for KIR, Then What?

The lead-in graphic provides some important clues to what KIR does (and comes from a Microsoft Community piece entitled How KIR works for the end user). KIR works by loading a configuration change from the cloud. Devices connected to WU (or WU for Business) get notified (settings data to the PCs at bottom). As the same time the new, problem code gets turned off.

MS tries to head trouble off by identifying and pushing out rollbacks before updates get widely applied. As they put it in the afore-linked item “most end users will never see the regressions.” PCs that agree to provide diagnostics info to MS will send information related to the affected code to which the update and regression apply (that’s the diagnostics data in grey). This idea, says MS is “to help us learn how well the rollback is succeeding…”

What About KB5031356 Itself?

The Update rolled out on October 10 (last Tuesday). Reports started appearing immediately. Apparently, MS pushed the rollback on or around October 12. They say it takes 48 hours for the rollback to interact with updated PCs, so that would indicate users who attempted updates between October 10 and October 14 (Friday) could be affected. Those who do fall prey to the error, according to WindowsLatest, should be able to recover using the DISM … /RestoreHealth command.

The error didn’t bite me, even though I updated on Patch Tuesday. But by now, it should be fixed. Worst case, one could uninstall the original KB then re-install the by-now patched version. That should work!

Facebooklinkedin
Facebooklinkedin

Syntax Errors Derail PowerShell JSON Edits

I’ve just completed a fascinating project for TekkiGurus: a five-part series on customizing and extending Windows Terminal. For the 5th and final part, I decided to build PowerShell scripting that would handle such customizations I use as don’t fall under the settings.json umbrella. Ironically, one of those tasks involved editing that very file to change the default font. That’s when I saw syntax erors derail PowerShell JSON edits, as shown in the lead-in graphic. Let me explain…

How Did Syntax Errors Derail PowerShell JSON Edits?

I started off my project by asking Copilot to present me with some initial PowerShell commands to handle the following tasks:

1. Download, install and set up Jan DeDobbeleer’s outstanding OhMyPosh prompt customization tool. This turns out to be a more complex task than it might seem, because it requires downloading, unzipping and copying Nerd Fonts into C:\Windows\Fonts, adding an invocation to the PowerShell Profile script, dealing with OhMyPosh, and then selecting a Nerd Font as the WT default.

2. Download, install and add the colortool executable to a default Windows path. Colortool is a GitHub project that provides information about Windows Terminal color assignments for text and text backgrounds. This one was pretty straightforward.

3. Install the winfetch utility that shows WT color schemes, system info, text colors, and a few other odds’n’ends. This required only one line of code, so easy-peasey.

The error showed up at the end of my PS sequence for the OhMyPosh tasks (I’ll refer to this as OMP from now on). Seems that Copilot’s code included two errors that it took me some time to find. First, the object sequence for the default font that OMP required turned out to be the string “.profiles.defaults.font.face” rather than the truncated version that Copilot provided (“.profiles.defaults.font”). Also, it used an alias for the default Nerd Font I chose rather than its full name — that is “CaskaydiaCove NF” instead of “CaskaydiaCove Nerd Font”. Interestingly, this alias worked in Windows 10, but not in Windows 11 (there, only the full name would do).

Errors Found Are Easily Fixed

It took me a while to figure this out because I couldn’t find exact documentation to match my problems precisely. I figured out the object sequence by examining the json.settings file from another Windows PC that had the default already set and following the sequence of the object name hierarchy in use in that file. In other words, I noticed a face property in that file that was missing from my rewritten json.settings file. No wonder it wouldn’t save.

Once I made that change, I got another error message (from Windows 11) that reported it couldn’t find a font named “CaskaydiaCove NF.” I so looked in C:\Windows\Fonts, and sure enough the font name in Explorer is actually “CaskaydiaCove Nerd Font.” And again, once I made that change things worked properly.

As the old saying goes: “It’s always easy when you know how.” It took me a while to get to the last detail in the “how” part, but indeed, it was dead easy after that. Things go that way a lot in Windows-World, especially when writing code or command line instructions. I’m just glad it’s working now!

One More Thing: Replacing Munged JSON File

On the machine where I made the object reference error, settings.json remained munged. It kept throwing errors each time I started up WT or PowerShell. So I  researched the topic and learned that if you open settings.json in a text editor, then delete the whole thing, WT will rebuild that file from programmed defaults when an empty file gets saved. That put my WT and PowerShell environments back to rights, and I was then able to get the corrected script to run to completion on that PC.

I’ll observe that if you’re going to edit settings.json in PowerShell on a Windows PC, it’s a good idea to have a backup at hand to replace that file. I’m learning that it’s kind of like working on the registry, where changes can have even more serious and dire side effects. Cheers!

Facebooklinkedin
Facebooklinkedin

Recent Windows Terminal Follies

It’s always a humbling experience to work and work with Windows. This week, I’ve been relearning how Windows 10 works with Windows Terminal (and sometimes doesn’t). I had to stand up a squeaky clean Windows 10 instance in a VM for some WT testing and research. Tongue planted firmly in cheek as I went through some recent Windows Terminal follies, I realized I’d forgotten more about WT than I’d ever known. Let me explain…

History Underlies Recent Windows Terminal Follies

Today, my production Windows 10 installation has been running since 2016, when I stood up my present primary desktop PC. There have been a LOT of changes to Windows since then. And indeed, Windows Terminal (WT) is one of the things that has changed the most. But because I’d gone along with those changes — growing more experienced and wise to the ways of WT — I really didn’t remember all of the little twists and turns along the way.

Thus, installing a clean Windows 10 OS image came as a series of shocks where WT was concerned. Let me list a few of them:

1. Windows 10 made its Insider Preview debut in 2014, WT didn’t come along until May 2019. Thus, it’s not set as the default command line environment in Windows 10.

2. WinKey+X, to my consternation, kept launching an older PowerShell version (v5.1.19014.3570). And the only version of WT present was an older Preview that I didn’t want.

3. Thus, I found myself visiting the MS Store to grab the latest copy of WT, installing it, then setting it as my default terminal application (see lead-in graphic: notice further than this version needs an upgrade).

Eventually, I got things sorted and where I want them to be. But it did come as something of a shock to understand how much change I’d been introducing to my desktop runtime, step by little step. Only when I had to jump the whole stretch in a single bound did I see how far things has really come.

Some Unexpected MSA Bonuses Also Present

OneDrive picks up files from my User folder as part of what it keeps in the cloud. Apparently this includes my PowerShell Profile, because an invocation to OhMyPosh showed up as I fired off the new WT install for the first time. That made setting up OMP even faster and easier than usual.

The moral of today’s story is that one doesn’t really recognize how far one has come (or how much things have changed) until one is forced to recover the same ground and see what’s different. That’s one good reason why — for me, at least — Windows-World is always an adventure.

Facebooklinkedin
Facebooklinkedin

WT Update Requires Application Restart

In the wake of the latest Patch Tuesday, MS has released an update for Windows Terminal. As it works its way through the upgrade process it makes two identical warnings: “Restart the application to complete the upgrade.” If you look at the lead-in screencap, you can see that because I hadn’t yet closed, then re-opened WT it’s still showing the old version in the list sub-command at the bottom of the PS session. As I’ll explain, WT update requires application restart before the upgrade truly takes effect.

Why WT Update Requires Application Restart

Indeed, the WT update requires users to close all open WT windows and then open a new one. That’s  so it can terminate the (old) running WT process(es). These are, of course, still running the 1.18.2681.0 version. When they’re all closed, the pointer switches to aim at version 1.18.2822.0 instead. Then, when you fire off a new WT instance, it’s running that new version, as you can see in the About info here:

WT Update Requires Application Restart.About-info

After the open/close, the new WT version number pops up in About.

As I’ve explained in a number of recent blog posts here (see this September 28 item as an example), self-update activities can be tricky. The cleanest way to handle this kind of thing is to request users to kill the current running instance after installing a new one. That way, it makes a cleaner hand-off from old to new, and provides a “quiet moment” between when the old and new instances start running to handle the housekeeping involved (changing file pointers, registry entries, environment variables, and so forth).

Still Waiting On Winget to Follow Suit

I’d like to see the Windows Package Manager/App Installer tool known as winget follow Windows Terminal’s lead when it comes to updating itself. Indeed, winget upgrade Microsoft.Winget.
Source_8wekyb3d8bbwe does work. That said, it’s a Store app so mostly this gets handled automatically in the background during its daily update cycles.

But when winget updates itself, even though it succeeds it often ends in a status labeled “Cancelled.” That’s not really true, but it is a valid indicator of the kinds of tricky things that self-updates can do (and cause). I’d like to see it take the same approach as WT, hold itself in abeyance, and let users re-jigger the works to make the transition from old to new versions neat and clean. Is this a pipedream? I hope not!

Facebooklinkedin
Facebooklinkedin

Reboot Fixes Winget Hiccup

I have to laugh. If you take a look at the lead-in graphic you might be tempted to believe something amiss with winget. I was yesterday when this happened on one of my test PCs. So naturally, I tweeted (X’ed?) an MS colleague who runs the winget team. About 5 minutes later he responded with “Try a reboot!” Seems that others had been reporting similar woes amenable to this approach. To my chagrin, indeed a reboot fixes winget hiccup — this time, at least. Sigh.

If Reboot Fixes Winget Hiccup, Then What?

That adds another thing I need to try before bothering the developers another time. And, if that works for me (and some few others), it might also work for you, too. Thus, it should become a part of the normal troubleshooting routine.

Indeed, I had closed and re-opened Windows Terminal prior to contacting the team. And it hadn’t done the trick this time. In fact, I even uninstalled and reinstalled winget and that hadn’t worked, either — as you can see in the lead-in graphic.

Had I known then what I now know, I would’ve tried the reboot before those other more severe fixes. And it would have worked. Thus, the next time winget goes wonky on me (especially after an update) I’ll be sure to reboot my PC and trying again before sounding the alarm.

Interesting, eh? Things may not always look simple or obvious in Windows-World. Thank goodness they may sometimes be both, and amenable to a simple solution. All hail the “three-fingered salute” (remember when CTRL-ALT-DEL would force reboot a PC?) There’s no school like the old school!

Note Added October 10 (early PM hours)

As fate would have it, MS pushed an update to PowerShell today for version 7.3.8 through WU. After it updated my problem test PC, the same issue recurred: winget source was essentially not working. None of my previous fixes (reboot, uninstall & reset sources) worked. I had to force install the current production version (1.6.2771) over the current preview version (1.7.2782) to get things working properly again. Funny that this problem should happen on the very day I attempt to document a different issue. Amazing!

Facebooklinkedin
Facebooklinkedin

Using Copilot Based PowerShell

As an experiment, I’m using Copilot to generate PowerShell commands to complete specific tasks. It’s all centered around scripting to customize Windows Terminal to add fonts, applications, and settings for a specific configuration. Using Copilot based PowerShell isn’t just a “load and go” operation. I’m having to understand and alter code to make sure it runs on both Windows 10 and 11 PCs. So far, I can’t say it’s faster than hacking it out from scratch. But I can say “very educational.”

Using CoPilot Based PowerShell, Step by Step

I’m stepping through the PowerShell code that Copilot presents for handling my specified tasks line by line. In some cases, I’m simplifying by making more direct assignments to variables and manipulating them in the scripts. In other cases, I’m cleaning up minor syntax violations (quotes around string values where they’re not needed, and so forth). In still other instances, I’m figuring out how to complete commands “silently” (supressing user interaction).

But most of what I’m getting is pretty usable. As somebody who’s written plenty of “real code” (Java, JavaScript, Perl, Python and more) this is an interesting way to expand my PowerShell chops. If you’ve got some minor automation to handle — that’s how I’d characterize my current quest — you might find this helpful, too.

Fruits of This Labor…

I’m working on a story for TekkiGurus. I will probably finish up this week, but it takes two-three weeks to get through the editorial pipeline. Thus, you should see a story there from yours truly near month’s end (October 2023, that is). My working title is Creating and Sharing Windows Terminal Profiles Across PCs. Stay tuned, and I’ll plug a link in (and correct the wording, if need be) when it’s up.

Facebooklinkedin
Facebooklinkedin

When Winget Upgrade Hits or Misses

Here’s an interesting observation about winget upgrade. I’ve slowly but surely gleaned it from repeat experience over the past 19 or 20 months. As I’ve been using the tool daily, I’ve noticed that for some apps or applications, winget upgrade sometimes works, and sometimes fails. It has finally dawned on me this on-again, off-again behavior depends on if the app or application is running at the time. Thus, if winget upgrade hits or misses ties to whether or not it can run the upgrade without stepping on something that’s running.

When Winget Upgrade Hits or MIsses, It’s for a Reason

This hit me forcibly on Monday when I noticed that an upgrade attempt for Microsoft.Office failed on on PC, but not another. The only difference between the two situations was that Word and Outlook were running on one machine (failed). On the other machine no Office components whatsoever were running (succeeded).

As I think back on other situations where this has happened, it’s often been web browsers involved. At one time or another, Chrome, Edge and Firefox (the three browsers I typically use) have all either failed or simply refused a winget upgrade command. And indeed, all were either actively running or had running processes showing in Task Manager when this occurred.

Another Kind of Update Trap?

I wrote recently (September 28) about Windows Self-Update Traps. These can pop up when winget, PowerShell or Windows Terminal get updates. Winget is conservative and won’t change things that could cause problems or lead to uncertain outcomes. Thus, I’m coming around a specific idea: if you use winget and you notice an update for a running application, save work and close it for best results. Gosh, where have I seen that advice before? It’s received wisdom when applying updates anyway. Perhaps that’s why?

Facebooklinkedin
Facebooklinkedin

Seeking Free Windows Backup Satisfaction

As of December 31, 2023, Paramount Software — the maker of Macrium Reflect — will no longer update its freeware version. I’ve been a long-time fan of this software. It has bailed me out of countless jams, many self-inflicted or the results of experiments gone bad. But I feel compelled to recommend a free backup tool to users, thinking that not everybody can (or wants to) pay for Windows backup. That’s why I’ve been seeking free Windows backup satisfaction for most of 2023. So far, I’m not too thrilled with what I’m finding outside the Macrium umbrella.

Still Seeking Free Windows Backup Satisfaction

As I often do when I’m looking for good software in some category, I turned to Tim Fisher at LifeWire. His 32 Best Free Backup Tools story, last updated in September 2023, certainly covers a lot of options. But now that MS has thrown ReFS volumes into the mix with its inclusion in the Dev Home utility for Windows 11, the number of suitable options drops precipitously. (Macrium Reflect, for example, supports ReFS only in its Server versions, which are not free. Many other tools on Tim’s list likewise omit ReFS in free versions.)

Tim’s #1 ranked choice is EasUS ToDo Backup which indeed comes in a free version that includes ReFS support. I’ve been messing about with it and it does the job. But gosh! The free version is chock-full of constant, annoying and even intrusive ads, ads, ads. Honestly, I *hate* it. And FWIW, Susan Bradley at AskWoody recommends buying a license if you use this product anyway. I have to concur, if only to make the darn thing SHUT UP already.

The Slot Remains Open…

As I dig through Tim’s sizable collection of possible Macrium Reflect replacements, I’ve yet to find something obvious to fill its slot. Val Potter at ComputerWorld gave me the option of recommending a paid-for tool instead when I revise my story on Windows Backup sometime soon. I may stick with Reflect anyway just because I know from long and sometimes hairy experience that it works, works, works.

If you have any suggestions for a killer free Windows backup app that’s neither Macrium Reflect nor EasUS ToDo Backup, please use the contact form here to drop me a line. I’m open to suggestion!

Facebooklinkedin
Facebooklinkedin

Avoiding Windows Self-Update Traps

Think about it. When a program needs an update, sometimes what’s doing the update and what’s getting the update may be related. This gets interesting. Windows itself is a pretty good example. This explains why reboots are required to install  an OS, and often when updating same. Simply put, the pieces being working on cannot also do the work on themselves in many cases. Applications, apps, and so forth can also fall prey to the same things (think about installing an installer). Thus, avoiding Windows self-update traps is something of a balancing act.

Example: Avoiding Windows Self-Update Traps

I saw a great example of an artful dodge around this problem yesterday, as I was using Winget to update Windows Terminal (WT). Take a look at the lead-in graphic. It shows the WT update progress. Note that the last instruction at the end of that process reads:

Restart the application to complete the upgrade.

That’s exactly the kind of maneuver that’s necessary. It allows the currently running code for a program (or OS) stop running. Then, the newly-updated or installed code for the same program (or OS) can take over and start doing its thing.

Counter-Example: PowerShell

Back in June, I wrote a blog post here entitled WinGet Upgrade PowerShell Shows Cancelled. It shows what can — and sometimes still does — happen when the tail end of the installation process fails to complete and exit cleanly. I know the PS team is working on this, but this shows that self-updates do pose occasionally tricky problems.

I’m glad to see the WT take the high road and suspend the final steps of install or upgrade until it’s safe to do so. I’ll be gladder still when the PS team eventually follows suit (as I’m sure they will). In the meantime, I did find a workaround: if you open a Command Prompt session and run the winget PS upgrade there, no “cancelled” (or other error messages) result. Good enough for me, for now!

Facebooklinkedin
Facebooklinkedin