There are a few questions and answers within StackOverflow relating to programmatically changing mouse pointer size. Those questions are often mislabelled as "cursor size". e.g. Change and update the size of the cursor in Windows 10 via PowerShell. Windows itself refers to "cursor" as the blinking line when editing text. This question is about the blinking line cursor.
I have found out how to change the caret/cursor size for Notepad++ with PowerShell:
$NotepadConfig = "C:\Program Files\Notepad++\config.xml"
if (Test-Path $NotepadConfig) {
(Get-Content -path $NotepadConfig -Raw) -replace '"Caret" width="1"','"Caret" width="3"' | Set-Content -Path $NotepadConfig
}
This is great, but only applies to Notepad++. I'd like to also change the general cursor/caret size for Windows (Start > search for "Change Cursor Thickness" to see the control panel for this).
Is there a way to programmatically change this value with PowerShell (I have not found out how in many searches)?
It would also be nice to be able to toggle the "Turn on text cursor indicator" option that is there if possible (presumably all of these settings are in the registry)?