You can do this with 2 methods, they all would query the registry key on your application load, and you could send the data either via IPC from your main to the render process or as preload script in the render process only.
- Spawn a process that executes reg query or similiar and you then parse the result string. I personally would do it via
Get-ItemProperty
in powershell. (simple)
This should return you the value as a JSON
Get-ItemProperty -Path Registry::HKEY_CURRENT_USERSOFTWAREMicrosoftWindowsCurrentVersionExplorerAdvanced -Name TaskbarSmallIcons | Select-Object -Property TaskbarSmallIcons | ConvertTo-Json
- Create/Use a native node module to call the Windows API (harder)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…