Smart Devices General
fi you're in CF2.0, use XML serialization to store it in permanent storage:
http://msdn2.microsoft.com/en-us/library/system.xml.serialization.xmlserializer.aspx
if you're in CF1.0, you can use simple File I/O or XML documents to store the ID in simple text form.
or, or install SQL Server mobile, and keep the ID in the DB.
however ... I don't believe the registry resests on hard reset ... only on image restoration ... I've made registry entires, pulled the battery overnight, put it back in in the morning, started the device, and I'm pretty certain I still had my registry values stored ... however, I haven't done anything with registry since February or March 06, so I could be recalling incorrectly ...
I assume you mean with 'hard reset' the 'Clean Storage' command. This brings the device back to factory default settings.
The only place that will persist is storing your data on an external storage card (SD Card/ Compact Flash).
Michael