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

Archive for the ‘Registry Files’ Category

Disabling the ever returning screens after Windows install/upgrade, and advertisements/feeds

Posted by jpluimers on 2025/07/21

This started out ad a post to make things easier for my mentally brother, but then I figured it makes it so much easier for myself as well: getting rid of the evern returning Windows nag screens. Not just the ones after logon during initial Windows install that get back about every other Windows 20H update (thank god they stepped away from 19## version numbering that felt so, ehm, last millennium), but also the various “suggestions” in start menu, on the taskbar and elsewhere.

I understand that basically giving Windows 10 and 11 for free to many Windows 7/8 licensed machines or Windows-preinstalled machines induces Microsoft to see Windows as an advertising environment, but hey: many users can do without these distractions.

It is hard to solve, as even the underlying registry settings seem to be reset every once in a while, and solving it globally is not an option: the settings are a per-user one. Which means you need to run script early during every Windows logon to overwrite these settings.

Read the rest of this entry »

Posted in Batch-Files, CommandLine, Conference Topics, Conferences, Development, Event, Power User, PowerShell, PowerShell, Registry Files, Scripting, Software Development, Windows, Windows 10, Windows 11, Windows Development | Tagged: | 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 »

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 »

“error accessing the registry” while importing a registry file

Posted by jpluimers on 2017/12/11

I while ago I had the error “error accessing the registry” while importing.

In my case I had escaped too many back-slashes. Not just the file names in the values, also the registry key names.

So I had key names like this:

[HKEY_CURRENT_USER\\Software]

That fails, but the error won’t tell you why. The key needs to be this:

[HKEY_CURRENT_USER\Software]

BTW: you do not need regedit.exe to import as reg.exe can do the same: [WayBack] How to add a .REG file to your Registry silently – Scott Hanselman

–jeroen

Posted in Development, Registry Files, Scripting, Software Development | Leave a Comment »

how to filter name/value pairs under a registry key by name and value in PowerShell – Stack Overflow

Posted by jpluimers on 2017/09/06

A long time ago I asked this question how to filter name/value pairs under a registry key by name and value in PowerShell? – Stack Overflow [WayBack] but forgot to schedule a post about it.

It’s an interesting scenario, so lets start with a log of the outcome (it’s on my ix500 scanning VM which has Office15 a.k.a. Office 2013 installed) of this script:

$path = 'hkcu:\Software\Microsoft\Windows\CurrentVersion\Extensions'
$key = Get-Item $path
$key

$namevalues = $key | Select-Object -ExpandProperty Property | 
  ForEach-Object { 
    [PSCustomObject] @{ 
      Name = $_; 
      Value = $key.GetValue($_) 
    } 
  }
$namevalues | Format-Table

$matches = $namevalues | 
  Where-Object { 
    $_.Name -match '^xls' `
    -or $_.Value -match 'msaccess.exe$' 
  }
$matches | Format-Table

It outputs this:

Read the rest of this entry »

Posted in Development, PowerShell, Registry Files, Scripting, Software Development | Leave a Comment »

reg files: Deleting Registry Keys and Values

Posted by jpluimers on 2016/08/10

The registry key deletion example from Microsoft is slightly wrong, as they wrapped the code over three lines:

[
-HKEY_LOCAL_MACHINE\Software\Test
]

That confuses some people, so here is the correct example:

[-HKEY_LOCAL_MACHINE\Software\Test]

The registry value deletion misses the square brackets, so that example should be like this:

[HKEY_LOCAL_MACHINE\Software\Test]
"TestValue"=-

The original Microsoft article:

Deleting Registry Keys and Values

To delete a registry key with a .reg file, put a hyphen (-) in front of the RegistryPath in the .reg file. For example, to delete the Test subkey from the following registry key:

HKEY_LOCAL_MACHINE\Software

put a hyphen in front of the following registry key in the .reg file:

HKEY_LOCAL_MACHINE\Software\Test

The following example has a .reg file that can perform this task.

[
-HKEY_LOCAL_MACHINE\Software\Test
]

To delete a registry value with a .reg file, put a hyphen (-) after the equals sign following the DataItemName in the .reg file. For example, to delete the TestValue registry value from the following registry key:

HKEY_LOCAL_MACHINE\Software\Test

put a hyphen after the “TestValue”= in the .reg file. The following example has a .reg file that can perform this task.

HKEY_LOCAL_MACHINE\Software\Test

“TestValue”=-

To create the .reg file, use Regedit.exe to export the registry key that you want to delete, and then use Notepad to edit the .reg file and insert the hyphen.

–jeroen

via: How to add, modify, or delete registry subkeys and values by using a .reg file..

Posted in Development, Registry Files, Scripting, Software Development | Leave a Comment »