Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent hard reset from deleting registry changes under WIN7?

I'm editing the Windows registry through my software, which for example replaces the Shell (Kiosk app).

Now I have just noticed that under Win7 if a hard-reset occurs (reset button, or 4 second power button) all the registry changes are lost.

Under WinXP however it works fine, even after a hard reset the changes I made are still there.

Do I have to do anything special after editing the registry under Win7 or is this even a built-in Win7 security feature maybe ?

To me it looks like that the registry changes aren't finalized and just saved in the memory until a soft-reset occurs, could this be true ? If so, can I force a save somehow ?

like image 542
user990767 Avatar asked Feb 16 '12 20:02

user990767


1 Answers

Sounds like you want the RegFlushKey function.

The RegFlushKey function returns only when all the data for the hive that contains the specified key has been written to the registry store on disk.

The RegFlushKey function writes out the data for other keys in the hive that have been modified since the last lazy flush or system start.

like image 177
Ben Voigt Avatar answered Oct 25 '22 14:10

Ben Voigt