Why do I have to re-install the CF and SQL CE after a power loss to make my app work??

  • Thread starter Thread starter Anthony Davis
  • Start date Start date
A

Anthony Davis

Hello All,
I am having an issue on my Windows CE device.
What happens is I install the Compact FR, SQLCE, then my Application.
All three are installed into the IPSM directory on my device (which is
supposed to be a safe store).

I then ship the device to a customer for a demo, when they get the
device they do not always charge it and may let it sit for a few days
(or weeks).

Once they re-charge the device, then click on my application icon it
gives a fatal error and dies.

I have to walk them through re-installing the CF and SQLCE, once this
is completed the application works fine.

(note: All 3 of the installs are still in the IPSM directory after
re-charging, but re-installing is still required)

I suspect this has something to do with registry settings getting
deleted when the power goes out in the device, is there some way I can
prevent this from happening?

Also is there a way to force the desktop and start menu icons for my
application to get replaced once they are removed due to power loss?

This is a very frustrating issue for me, so any help or suggestions
are greatly appreciated.

Regards,
Anthony Davis
 
Anthony,

You may want to put the 3 cabs (CF, SQLCE, your app) on a storage card
in the device to survive a complete drain of the backup battery. Doesn't
sound
like this IPSM store can handle a total discharge.

-Darren Shaffer
 
Anthony,

This really depends on the device... If the power dries up, and the backup
power also goes, then when the device is powered on it would be as though
you are performing a cold boot and reverting back to manufacturer settings.
If as you've said, you manage to find some partitions sitting in the
persistent side of the memory, then you can keep data.

As you've discovered though, installing the software will put all the setup
and install information into non-persistent or volatile memory, meaning that
when the power goes, this information leaves with it.

There are various ways around this, all based on the type of device you
have. Some partitions have spaces that run every time the device is rebooted
(cold), so one work around would be to have the device "reinstall"
everything automatically should it not be installed to start with.

Dan.
 
This depends on the device your using. Some partitions are persistent (like
memory cards) through power droughts.

Dan.
 
The other comments in the thread are somewhat on-point, but I think what's
going on is that the GAC is being destroyed, because it resides in the
Windows directory, not in the IPSM folder. The IPSM folder *is* persistent,
guys, though any sort of power loss (it's in FLASH memory).

There's no really good way to handle this, unless you can build some sort of
a startup application which will check to see if the items you've asked
about are properly in the GAC and, if not, put them there on startup,
allowing you to run properly as soon as the system is fully operational
again. The best way is to have those pieces in the 'ROM' of the device,
where you don't have to worry about them or the GAC entries for them going
away.

To figure out the best way to proceed, contact the device OEM for guidance.

Paul T.
 
The files are there, but the registry entires have been removed, so the
install is essentially lost anyway. Ship the install package in IPSM (set
to read only) so they can simply tap the CAB and reinstall.
 
Thanks all!
There is a lot of good info here.
I sent a message to the manufacture, they are 9 hours ahead of my time
so I may not have a reply until tomorrow.

It appears the easiest solution will be to add the registry settings or
GAC to a safe storage location so that when the battery dies these
settings will not be removed.

The device is manufactured specifically for my company so I am hoping
that they will be able to assist in sending me devices configured
properly to resolve this issue.

Thanks again for all of your assistance!

Anthony
 
If it's built just for you, have them put the CF and SQL CE support in the
OS image and you'll never have to deal with it again. Our devices have that
stuff in ROM and never have to reinstall (we use IPSM, too. Hmmm.)

Paul T.
 
Paul,
That is the best idea I have heard yet, and since all of our
applications use the CF and SQLCE it will resolve a ton of setup issues.

Thanks!

Anthony
 
Back
Top