XP Registry is Overwritten on Cold Boot

S

Steve

Hi All,

I am using XP on an industrial PC to control a few things around my farm.
I have written a VB program that worked perfectly on Win98 and 2k.
The program uses the registry to store a number of states and variables.

They are in the usual "Current User', Software, 'VB and VBA Programs' hive.

Weekly the PC resets via a simple power cycle (rather than shutdown).
It'll also power cycles based on a built in watchdog device. No shutdown
here either.

My problem is that when XP reboots the registry is reloaded to old values.
The 'old values' appear to be registry keys that were stored last time a
proper shut down or restart was implemented.
I can emulate this process manually. I have checked that the program is
writing to registry via regedit. Once I power cycle it the registry is back
to the 'old values' again.

I figure this has something to do with System Restore or Last Known Good
Condiguration.
I've not got much experience with this so need your help.
I have looked up how to "Turn Off System Restore" but my Control
Panel->System menu is not showing the system restore tab.
Why? I don't know. I thought I did a normal install of XP. Would it be
because I am running system from a compact flash card?

Are there settings to stop windows reloading the Registry? A registry
setting? or Command line program?
Is it another process? i.e. not system restore that is doing it?

Cheers,

Steve
 
R

Rick \Nutcase\ Rogers

Are you stating that you are simply shutting off the power rather than
allowing Windows to properly shutdown/restart? If so, then that is a bad
habit that you will have to break yourself of. Windows assumes there is a
problem if it is not properly shut down, and will often load the last known
good config (this has nothing to do with System Restore) if an improper
shutdown is detected. Also, improper shut downs can also cause corruption of
the file system and trust me, that is a lot harder to recover from (we're
talking permanent loss of data here).

--
Best of Luck,

Rick Rogers, aka "Nutcase" - Microsoft MVP

Windows help - www.rickrogers.org
 
R

Rick \Nutcase\ Rogers

On rereading your post, I also noted that you are booting from a compact
flash card. Be aware this is not a supported scenario, so all bets are off
as far as the OS behaving properly. Likely you have gutted the system some
to fit (XPLite?) and disabled VM, so this may be a symptom of those
modifications as well.

--
Best of Luck,

Rick Rogers, aka "Nutcase" - Microsoft MVP

Windows help - www.rickrogers.org
 
S

Stan Brown

Weekly the PC resets via a simple power cycle (rather than shutdown).
It'll also power cycles based on a built in watchdog device. No shutdown
here either.

My problem is that when XP reboots the registry is reloaded to old values.

The registry gets saved during shutdown -- you know, that "Saving
your settings..." message.

If you want your values preserved, either fix the problem that's
causing the power cycle, or else reboot immediately after storing
your values.

However ...

Shutting down the power without first shutting down Windows is a
really bad idea. You're almost guaranteed to corrupt your file system
sooner or later.
 
P

philo

I figure this has something to do with System Restore or Last Known Good
Condiguration.
I've not got much experience with this so need your help.
I have looked up how to "Turn Off System Restore" but my Control
Panel->System menu is not showing the system restore tab.
Why? I don't know. I thought I did a normal install of XP. Would it be
because I am running system from a compact flash card?


you need to make a normal shutdown
rather then just killing the power
 
R

Ron Martell

Steve said:
Hi All,

I am using XP on an industrial PC to control a few things around my farm.
I have written a VB program that worked perfectly on Win98 and 2k.
The program uses the registry to store a number of states and variables.

They are in the usual "Current User', Software, 'VB and VBA Programs' hive.

Weekly the PC resets via a simple power cycle (rather than shutdown).
It'll also power cycles based on a built in watchdog device. No shutdown
here either.

My problem is that when XP reboots the registry is reloaded to old values.
The 'old values' appear to be registry keys that were stored last time a
proper shut down or restart was implemented.
I can emulate this process manually. I have checked that the program is
writing to registry via regedit. Once I power cycle it the registry is back
to the 'old values' again.

I figure this has something to do with System Restore or Last Known Good
Condiguration.
I've not got much experience with this so need your help.
I have looked up how to "Turn Off System Restore" but my Control
Panel->System menu is not showing the system restore tab.
Why? I don't know. I thought I did a normal install of XP. Would it be
because I am running system from a compact flash card?

Are there settings to stop windows reloading the Registry? A registry
setting? or Command line program?
Is it another process? i.e. not system restore that is doing it?

Cheers,

Steve

Shutting down by cutting off the power is an extremely bad idea.

If you want to continue doing it this way then invest in a small
"smart" UPS system with control software and do your shut down by
cutting off the power to the UPS. That way the UPS will immediately
switch to battery and do a proper shutdown of Windows XP. Then when
the computer is restarted it should load up with the correct registry
settings.

Good luck

Ron Martell Duncan B.C. Canada
--
Microsoft MVP (1997 - 2006)
On-Line Help Computer Service
http://onlinehelp.bc.ca

"Anyone who thinks that they are too small to make a difference
has never been in bed with a mosquito."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top