The post seems to be AI generated but the issue exists. I run into the same on 26200.9278: whatever mouse cursor/theme I set in new settings app or the old control panel, it does not work. My regular cursor seems to be locked into aero_arrow_l.cur and also other cursor state does not match my settings.
What does not work:
- Set theme in Settings/Customization.
- Select another cursor preset in control panel.
- Switch cursor color white/black/invert in Settings/Accessibility.
- Change cursor size in Settings/Accessibility. It just enlarges the already large cursor.
- Logout/reboot. The large cursor is also used before login.
Finally GPT generated this script seems to be a workaround, although I do not fully understand:
& {
# Load Win32 cursor APIs.
Add-Type @"
using System;
using System.Runtime.InteropServices;
public static class CursorNative
{
[DllImport("user32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
public static extern IntPtr LoadCursorFromFile(string lpFileName);
[DllImport("user32.dll", SetLastError = true)]
public static extern bool SetSystemCursor(IntPtr hcur, uint id);
}
"@
# Read the currently configured cursor scheme from the registry.
$cursorSettings = Get-ItemProperty 'HKCU:\Control Panel\Cursors'
# Registry value name -> Win32 OCR_* cursor ID.
$cursorMap = [ordered]@{
Arrow = 32512 # OCR_NORMAL
IBeam = 32513 # OCR_IBEAM
Wait = 32514 # OCR_WAIT
Crosshair = 32515 # OCR_CROSS
UpArrow = 32516 # OCR_UP
SizeNWSE = 32642 # OCR_SIZENWSE
SizeNESW = 32643 # OCR_SIZENESW
SizeWE = 32644 # OCR_SIZEWE
SizeNS = 32645 # OCR_SIZENS
SizeAll = 32646 # OCR_SIZEALL
No = 32648 # OCR_NO
Hand = 32649 # OCR_HAND
AppStarting = 32650 # OCR_APPSTARTING
}
foreach ($entry in $cursorMap.GetEnumerator()) {
$role = $entry.Key
$ocr = [uint32]$entry.Value
# Get the .cur/.ani path configured for this cursor role.
$path = $cursorSettings.$role
# Some default roles, such as IBeam or Crosshair, may intentionally
# have an empty registry value and use a built-in Windows resource.
if ([string]::IsNullOrWhiteSpace($path)) {
Write-Host "[SKIP] $role - no custom cursor file configured"
continue
}
# Expand values such as:
# %SystemRoot%\cursors\aero_arrow.cur
$path = [Environment]::ExpandEnvironmentVariables($path)
if (-not (Test-Path -LiteralPath $path)) {
Write-Warning "[FAIL] $role - file not found: $path"
continue
}
# Load the cursor directly from disk, bypassing the Windows
# cursor-scheme loader that appears to be selecting the wrong
# large cursor variant.
$cursorHandle = [CursorNative]::LoadCursorFromFile($path)
if ($cursorHandle -eq [IntPtr]::Zero) {
$win32Error = [Runtime.InteropServices.Marshal]::GetLastWin32Error()
$message = [ComponentModel.Win32Exception]::new($win32Error).Message
Write-Warning "[FAIL] $role - LoadCursorFromFile: $win32Error ($message)"
continue
}
# Replace the corresponding system cursor for the current session.
$result = [CursorNative]::SetSystemCursor(
$cursorHandle,
$ocr
)
if (-not $result) {
$win32Error = [Runtime.InteropServices.Marshal]::GetLastWin32Error()
$message = [ComponentModel.Win32Exception]::new($win32Error).Message
Write-Warning "[FAIL] $role - SetSystemCursor: $win32Error ($message)"
continue
}
Write-Host "[ OK ] $role -> $path"
}
}