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

Archive for the ‘Windows’ Category

Increase audio quality in Remote Desktop Connections – Increase audio quality in Remote Desktop Connections

Posted by jpluimers on 2022/03/25

I wish mstsc.exe had a command-line parameter for this, but you have to either change it server-wide, or for each client using a .rdp file as per [Wayback] Increase audio quality in Remote Desktop Connections – Increase audio quality in Remote Desktop Connections

I really dislike fuzzy/tinny audio. Sometimes RDP connections with RDC clients results in laggy and/or poor quality audio. A two step tip that you can use to try and solve these problem in Windows7:

#1 on the server (the machine you are connecting to)

Using the Group Policy editor, Go to Computer Configuration:Administrative Templates:Windows Components: Remote Desktop Session Host:Device and Resource Redirection. Set “Limit audio playback quality.”  to “Enabled,” and set “Audio Quality” option “to High”.

#2 on the client (the machine you are connecting FROM) save and edit the RDP file for the connection and add  set audioqualitymode:i:2 to the file (you can use Notepad or a similar text editor to do this)

I got there via [Wayback] Remote Desktop software that works with audio (Windows) – Software Recommendations Stack Exchange which also taught me this (thanks [Wayback] Basj):

The last one is backed up by [Wayback] Audio FAQ – RealVNC Help Center

What can and can’t I do with audio?

Audio is available for [Wayback] Professional and Enterprise users, and allows the user to play audio on the Server and hear it on the Viewer. Now, in addition to seeing what is displayed on the Viewer and controlling the remote computer as though you were sitting in front of it, you can also hear what is playing on its speakers.

How do I turn the audio feature on or off?

The audio feature can be controlled from both the Server and the Viewer and must be activated on both for sound to work. On the Server, you can allow connected Viewer users to hear audio using “Global Permissions” in Options > Users & Permissions. (You can also set audio on a per-user basis.)

mceclip1.png

The audio permissions can be controlled per connected user account via the Server options page. On the Viewer, there is a mute/unmute setting to tick.

mceclip0.png

From [Wayback] audio – How can I forward sound over VNC? – Unix & Linux Stack Exchange, I learned that on Linux, PulseAudio might help, but requires SSH access:

You can use PulseAudio to move sound over SSH, though, which may be better than nothing for you.

Check out this post: [Wayback] https://razor.occams.info/blog/2009/02/11/pulseaudio-sound-forwarding-across-a-network/

–jeroen

Posted in Power User, Remote Desktop Protocol/MSTSC/Terminal Services, Windows | Leave a Comment »

Chocolatey 1.0.0 got released last week (chocolatey/choco · GitHub)

Posted by jpluimers on 2022/03/24

Last week finally there was the stable [Wayback/Archive] Release version 1.0.0 · chocolatey/choco · GitHub.

So I fixed the Wikipedia page

It was a few days after the 11th birthday “Celebration”: [Wayback/Archive] Chocolatey Software Blog | This One Goes To 11! Celebrating 11 Years Of Chocolatey. Not a really festive post, though it does have a really nice overview of 11 years of Chocolatey history and clearly showing the momentum of it has been a few years behind us.

The thing is: hardly anybody noticed the celebration nor the 1.0.0 release. Being at various 0.* versions for like a decade makes people not follow sudden version bumps closely. I only noticed when updating a bunch of testing VMs of which one had a problem, so I inspected the logs and saw the 1.0.0 version.

So these recent tweets did not gain much attention:

Anyway: the release notes indicate a few things scheduled for 2.0.0. Given the sudden 0.12.0 -> 1.0.0 bump, I have no clue far (or near!) in the future that will be.

It is kind of both a saddening and relieved feeling: like for instance Stack Overflow/Stack Exchange (both in the same age cohort as Chocolatey), Chocolatey is just there and mostly works.

–jeroen

Posted in .NET, Batch-Files, C#, Chocolatey, CommandLine, Development, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows | Leave a Comment »

Some links on making a Windows 10 image backup to a network share and restoring from it

Posted by jpluimers on 2022/03/24

Earlier this month, I posted How to make a full backup of your Windows 10 PC | Windows Central.

That solution describes how to backup to and restore from a (different) local drive using the Windows 7/8.x tools ([Wayback] “Create a system image”) that still ship with Windows 10.

Soon, I need to be able to store a backup on a network location (and restore from it), so here are some links that hopefully solve this with the same tools (all via [Wayback] windows 10 restore image from network folder – Google Search):

–jeroen

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

Stop 0x0000007B after converting an existing XP machine to a Virtual Machine (ESXi, Hyper-V, or other)

Posted by jpluimers on 2022/03/22

In 2015, I posted P2V of an existing XP machine to Hyper-V to have an emergency fallback when retiring old XP physical machines and did a short edit on 20210727 promising about a future article on trying to fix the [Waybackstop 0x0000007B blue screen.

This stop can that can happen during boot when the converted Windows XP requires different disk drivers than the physical Windows XP. Windows Vista and up are smarter to figure out the required changes, but Windows XP wasn’t.

The above screenshot is actually from the same physical Windows XP machine after doing the conversion, I wanted to try and run the virtual machine on physical hardware close to the original before moving it to the actual VMware host (yup, the Windows XP machine had been used as a VMware host before, so it had both VMware Workstation 6.5 and VMware Converter 4.01 installed).

The reason I wanted to move my last Windows XP machine to a virtual machine was that it was the only computer that could still print to my old, but nice, Olympus P-400 color dye sublimation printer. I mentioned this in 2015 when Installing the PIXMA mini260 – Canon Europe drivers under Windows 8.1 x64 – trying to say goodbye to Windows XP

I need to find a way to get my [Wayback/Archive.is] Olympus Camedia P-400 Digital Color Photo Printer. That is a lot harder: the latest Windows [Wayback] P-400 Printer > Software Downloads are for Windows XP.

At the end, of the blog post are a few links on the stop 0x0000007B and the Universal Boot CD for Windows workaround.

Read the rest of this entry »

Posted in Fusion, Hyper-V, Power User, View, Virtualization, VMware, VMware Converter, VMware ESXi, VMware Workstation, Windows, Windows XP | Leave a Comment »

Driver Store-File Repository using huge disk space. How can I reduce – Microsoft Community

Posted by jpluimers on 2022/03/18

[WayBack] Driver Store-File Repository using huge disk space. How can I reduce – Microsoft Community

Try deleting the unneeded drivers by following the steps below:

  1. On the search bar, type command prompt, right-click on it from the list then run it as Administrator.
  2. Type the command pnputil.exe /e > c:\drivers.txt then click Enter.
  3. This command will create a file drivers.txt on C: drive with the list of driver packages that are stored in the File Repository folder.
  4. Delete all unnecessary drivers with the help of command pnputil.exe /d oemNN.inf (NN — is a number of drivers file package from drivers.txt, as example oem07.inf). In case the driver is in use, you will see an error while trying delete it.

This can happen if you swapped a lot of hardware around. Especially graphics drivers tend to be bloatware.

Note this only deletes uninstalled drivers. The problem: some driver software, especially video drivers, keeps parts installed, even during uninstall, and even when running in Safe Mode.

Examples for AMD:

Booting in Safe Mode

One of the nagging Windows 10 things is that out of the box it is hard to boot in safe mode: you have to reset and fail the boot your Windows system multiple times, or you have to hold a shift key (which some BIOS versions do not allow).

Luckily, you can reset the “press F8 during boot” behaviour of older Windows versions:

  1. Start an administrative command prompt (confirm UAC elevation if needed)
  2. Run this command (the bold changes the setting; the others keep track of the changes and show the difference):
    bcdedit /enum > %temp%\bcdedit.original.txt
    bcdedit /set {bootmgr} DisplayBootMenu true
    bcdedit /enum > %temp%\bcdedit.F8-enabled.txt
    fc %temp%\bcdedit.original.txt %temp%\bcdedit.F8-enabled.txt

    (many sites you also need to run something like bcdedit /set {default} bootmenupolicy legacy or bcdedit /set {current} bootmenupolicy legacy or replace the “default” and “current” with the boot option of your choice, but that is not needed)

  3. Reboot
  4. Press F8 once (not multiple times!) as soon as the boot screen appears

    Do not press F8 twice, as it usually runs the mode with early loading of anti-virus software disabled.

  5. Press F4 for “Safe Mode”

This works way better than holding the shift key during rebooting: often that does not work on the machines I tried it on (despite [WayBack] How to boot Windows 10 in Safe Mode – CCleaner.com claiming it should work).

Notes

The DisplayBootMenu for bootmgr (which I found via [WayBack] Boot menu policy – set text or graphical style boot menu Windows 8) seems only documented for Azure site:docs.microsoft.com “bcdedit” “DisplayBootMenu” “bootmgr” – Google Search:

[WayBack] Azure Serial Console for Windows | Microsoft Docs

Disregard the official documentation and other links indicating about bootmenupolicy as they require you to set it for each boot configuration, while setting DisplayBootMenu for bootmgr sets it for all configurations at once:

Without bcdedit, be prepared for lengthy steps:

Boot menu options enabled

These options will be enabled when you have a boot menu (the numbers are the number keys or function keys to press in order to activate the option) via [Archive.is] Windows Startup Settings (including safe mode) – Windows Help:

  1. Enable debugging
  2. Enable boot logging
  3. Enable low-resolution video (640×480)
  4. Enable Safe Mode
  5. Enable Safe Mode with Networking
  6. Enable Safe Mode with Command Prompt
  7. Disable driver signature enforcement
  8. Disable early launch anti-malware protection
  9. Disable automatic restart after failure

[WayBack] Image via [WayBack] Image Search from [WayBack] How to Fix a Computer That Won’t Start in Safe Mode:

Uninstall display drivers

The most effective way to fully get rid of a video driver is to run DDU (Display Driver Uninstaller) in Safe Mode.

I found it via [WayBack] Windows downgrade my Radeon Software down to 15.11 | Community.

–jeroen

Read the rest of this entry »

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

Fixed Windows Update errors 0x80070643 and 0x80073712 in one go

Posted by jpluimers on 2022/03/15

The below image is Dutch, but it presents Windows Update errors [Wayback] 0x80070643 and [Wayback] 0x80073712. The first happened when any update was installed after the second occurred.

My hunch was that both were related, so fixing the second should fix the first.

Windows update errors 0x80070643 and 0x80073712

Windows update errors 0x80070643 and 0x80073712

Try 0: reboot

The first step in any odd error is trying to reboot.

Try 1: cleanup

With most Windows Update errors, after rebooting, I usually check disk space (since quite a few of my Windows installs are VMs, so I need to keep VM disk sizes low enough to be able to store all these VMs): there was a comfortable 13 gigabytes free.

Running cleanmgr.exe showed some 5 gigabytes was taken by Windows Update files and almost 1.5 gigabyte by Windows Delivery Optimisation. Cleaning that up brought the free space to almost 20 gigabytes and clear any potential download corruptions: they happen, despite TLS.

Oh Delivery Optimization is just a distributed peer-to-peer cache of Windows related updates, see List of Microsoft Windows components: Services – Wikipedia and [Wayback] Delivery Optimization for Windows 10 updates – Windows Deployment | Microsoft Docs.

Try 2: run the console version of the the Windows Update troubleshooter

After cleanup did not resolve the issue, so the next step is to either run the [Wayback] GUI version of the Windows Update Troubleshooter or from the console equivalent using the below DISM statements.

The below steps are from [Wayback] Windows Update error 0x80073712, but many other sources describe the same steps:

  1. Start a Command Prompt as elevated Administrator

  2. In the Administrator: Command Prompt window, type the following commands. Press the Enter key after each command:

    DISM.exe /Online /Cleanup-image /Scanhealth

    DISM.exe /Online /Cleanup-image /Restorehealth

  3. When finished, re-run the updates

Note that DISM can take a very long time, even on a recently installed Windows machine: the first took 5 minutes, the second also 5 minutes on a VM that was backed with fast SSD storage and had plenty of CPU and memory. These are my results show no corruption, but did repair the problem:

C:\temp>DISM.exe /Online /Cleanup-image /Scanhealth

Deployment Image Servicing and Management tool
Version: 10.0.19041.844

Image Version: 10.0.19043.1052

[==========================100.0%==========================] No component store corruption detected.
The operation completed successfully.

C:\bin\bin>DISM.exe /Online /Cleanup-image /Restorehealth

Deployment Image Servicing and Management tool
Version: 10.0.19041.844

Image Version: 10.0.19043.1052

[==========================100.0%==========================] The restore operation completed successfully.
The operation completed successfully.

C:\temp>

Success

Despite DISM not showing any issues, it did repair the problem.

A retry of the updates (without even rebooting) showed a successful update requiring a reboot:

Success: updates were installed and Windows wanted to reboot

Success: updates were installed and Windows wanted to reboot

More to try

If the above fail, there are two more things to try: reset the whole update mechanism, or verify/repair the .NET framework integrity.

Repairing the .NET framework (specifically for 0x80070643)

Via [Wayback] Windows Update – error 0x80070643 – Microsoft Community.

From [Wayback] Download Microsoft .NET Framework Repair Tool from Official Microsoft Download Center, download NetFxRepairTool.exe (the actual download is via the [Wayback] Download Microsoft .NET Framework Repair Tool from Official Microsoft Download Center:confirmation at [Wayback] download.microsoft.com/download/2/B/D/2BDE5459-2225-48B8-830C-AE19CAF038F1/NetFxRepairTool.exe) and run it.

Resetting the Windows Update mechanism

This is a two part exercise of which the second part is not always needed.

First part: start with a fresh %windir%\SoftwareDistribution

Suggested by for instance

Run these commands in an Administrator elevated command prompt:

net stop wuauserv
rename %windir%\SoftwareDistribution SoftwareDistribution.old
net start wuauserv

If after this, Windows updates work again, then recursively delete the %windir%\SoftwareDistribution folder.

Second part: start with a fresh %windir%\System32\catroot2

Order slightly corrected from [Wayback] Can’t rename Catroot2 and SoftwareDistribution folder in Windows – Microsoft Community because of service dependencies:

net stop bits
net stop wuauserv
net stop cryptsvc
rename %windir%\System32\catroot2 catroot2 .old
net start bits
net start wuauserv
net start cryptsvc

Note that some sources

  • indicate you need to stop and start msiserver too, but that does not seem necessary any more.
  • fail to indicate you need to stop and start cryptsvc, but that is indeed needed.

Third: fully reset the Windows Update mechanism

This is hardly needed, but [Wayback] Windows Update – Additional resources – Windows Deployment | Microsoft Docs has even more steps to fully reset the Windows Update components on your system.

–jeroen

 

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

Boomer screenshots: wondering why Windows still has no keyboard shortcut for saving a screenshot or screen snippet to disk

Posted by jpluimers on 2022/03/14

With the disappearing PrtScn buttons on modern keyboards, boomer screenshots are about the only way to easily persist a screenshot, as these are the only available Windows screenshot shortcuts:

  • PrtScn: copies full screenshot to the clipboard; multiple invocations overwrite the clipboard
  • Windows + PrtScn: saves full screenshot to a file; multiple invocations saves to new files
  • Windows + Shift + S: copies full screen or part of the screen to the clipboard, and allows manual action to start snippet tool to save the clipboard contents; often looses the image when on remote desktop connections or when copying something else to the clipboard; multiple invocations overwrite the clipboard

Now look at macOS what a choices, and how less messy than on Windows:

macOS has various shortcuts to save (partial) screenshots to clipboard or file

macOS has various shortcuts to save (partial) screenshots to clipboard or file

For macOS 10.14 Mojave and newer, you can even set the folder (default: Desktop) to save the screenshots to:

I want this ease in Windows as well, and maybe I can in part without installing external tools and modifying existing shortcuts to make things easier:

Written after bumping into [Archive.is] Jeff Atwood on Twitter: “Someone just called a smartphone pic of their monitor a “boomer screenshot” and I literally LOLed 🤣… “

–jeroen

Posted in Apple, LifeHacker, Mac OS X / OS X / MacOS, Power User, PowerToys, Windows, Windows 10 | Leave a Comment »

I could not get this to work: Use a second laptop as an extended monitor with Windows 10 wireless displays – Scott Hanselman’s Blog

Posted by jpluimers on 2022/03/10

I had a vague recollection of this was possible, so I was glad to find it back after having recovered from all cancer treatments at [Wayback] Use a second laptop as an extended monitor with Windows 10 wireless displays – Scott Hanselman’s Blog.

The feature is called “Miracast” and has a built-in Windows 10 implementation for both sending and receiving not just over WiFi, but also over the local fixed ethernet network: [Wayback] Miracast on existing wireless network or LAN – Surface Hub | Microsoft Docs.

With such support, I’d expected an “it works out of the box” experience. It is far from that, so let me show what I bumped into and how I finally did not get it working.

TL;DR

  1. Windows will tell you when it doesn’t work
  2. Windows won’t tell you why it doesn’t work
  3. The tooling to try to find out why it doesn’t work is not sufficient: documentation is scarce and far from complete

When out of luck

I tried two machines with Intel processors having built-in graphics engines.

Thinkpad T510

Read the rest of this entry »

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

How To Fix Missing Hibernation Option On Windows 10

Posted by jpluimers on 2022/03/10

Windows 10 on desktops still defaults to the Sleep option to be available in any Power action while the Hibernation option is unavailable.

This is odd now that most systems have fast and sizable SSD options: from a power loss perspective, Hibernate is much safer than Sleep on desktop machines.

[Wayback] How To Fix Missing Hibernation Option On Windows 10 explains how to restore the Hibernate option.

It is a three step process, partial on the Administrator elevated command-line, part in the UI. I wish all could be done on the commandline

  1. Enable an hibernation file: powercfg.exe /hibernate on
  2. Start the “Power Options” control panel applet: powercfg.cpl
  3. In the UI, under “Choose what the power buttons do”, disable “Sleep” and enable “Hibernate” (you might need to “Change settings that are currently unavailable” first), then press “Save changes”

I have not tried yet, but these Registry Values under [Wayback]HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings might just cut it, but I am not sure it is complete:

  • ShowHibernateOption with values 0 and 1
  • ShowSleepOption with values 0 and 1

There is also a value ShowLockOption that defaults to 1.

Two git places where these registry values are mentioned:

–jeroen

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

How to make a full backup of your Windows 10 PC | Windows Central

Posted by jpluimers on 2022/03/03

Quite an OK guide on how to backup and restore on Windows 10 (since so much has changed since Windows 7, and some Windows 7 stuff is still there but has moved)

[Wayback] How to make a full backup of your Windows 10 PC | Windows Central

In this guide, we’ll show you the steps to create a full backup of your computer, which includes everything from settings, apps, to files using the System Image Backup tool on Windows 10.

–jeroen

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