I need to get and display in CLI the settings values of "Location", "Action Center" and "Touch Keyboard" under [Start > Settings > Personalization > Taskbar > Turn system icons on or off] whether they are turned on or off using batch script or powershell.
Previous Header: I need to implement this script using Batch Script or PowerShell. First, I'm searching for a valid and existing (by default) Registry Path for [Turn system icons on or off] settings for "Location", "Action Center" and "Touch Keyboard".
As of now, the Registry Path of HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer (Given by Microsoft CoPilot) is not relevant because the Windows Settings in question must be configured via Group Policy to be able to reflect their Registry Key on that path.
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer"
Another Registry Path of HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer (Given by ChatGPT) does not seem to work because of a non-existing Registry Key despite the Windows Settings in question being turned off.
reg query "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer"
This one is also not working even though I have already changed its value from default.
@echo off
setlocal enabledelayedexpansion
set KEY="HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify"
echo Checking system icon visibility status...
echo.
for %%I in (HideClock HideSCAVolume HideSCANetwork HideSCAPower HideInputIndicator HideLocation HideActionCenter) do (
reg query %KEY% /v %%I >nul 2>&1
if !errorlevel!==0 (
for /f "tokens=3" %%A in ('reg query %KEY% /v %%I ^| find "%%I"') do (
if %%A==0x1 (
echo %%I: Hidden
) else if %%A==0x0 (
echo %%I: Shown
) else (
echo %%I: Unknown value %%A
)
)
) else (
echo %%I: Default ^(Not Set^)
)
)
endlocal
pause
Here's the output
> HideClock: Default (Not Set)
> HideSCAVolume: Default (Not Set)
> HideSCANetwork: Default (Not Set)
> HideSCAPower: Default (Not Set)
> HideInputIndicator: Default (Not Set)
> HideLocation: Default (Not Set)
> HideActionCenter: Default (Not Set)
I'm open to ANY kind of solutions (Not limited to Registry Path only), even complicated ones.
I also need to know if the implementations I requested are currently not possible to implement, for documentation purposes only.

PowerShelltag?