My Java app runs as a Windows service under "Local System" user and uses the Windows registry.
I've noticed that after a Windows update and a machine restart my keys which are stored under HKEY_USERS\S-1-5-18\Software\JavaSoft\Prefs\
were deleted. here are some logs from the Windows event log:
The access history in hive \Device\HarddiskVolume1\Boot\BCD was cleared updating 24 keys and creating 5 modified pages.
The access history in hive \SystemRoot\System32\Config\SOFTWARE was cleared updating 30655 keys and creating 6722 modified pages.
The access history in hive \SystemRoot\System32\Config\SAM was cleared updating 71 keys and creating 7 modified pages.
The access history in hive \SystemRoot\System32\Config\DEFAULT was cleared updating 185 keys and creating 26 modified pages.
The access history in hive \SystemRoot\System32\Config\SECURITY was cleared updating 72 keys and creating 5 modified pages.
This was observed in OS Windows 2012 and Windows 2016 with different KBs.
Did anyone else face the same issue? Can anyone explain why does the registry is being cleared?
Will it help if I will use a different path in the registry, such as "HKEY_LOCAL_MACHINE"?
Any suggestions for how to avoid this scenario?