You need to hold the current stage of the application in some persistent
form. Either storing something to disk, or writing to a database etc, so
that when the machine comes back up and your application starts, the first
thing it does is to read a "marker" file of some sort to decide where it
needs to start from.
The simplest way, thinking this through briefly, would be (worling
backwards) to have a file that you check for when the application loads. If
it exists, then read the data in. This data would contain a marker point
that you could then use to decide where your application needs to run
(continue) from. Now at each point of execution where there is a reboot
aftter an event, the last stage before a reboot is to create this file and
insert your marker. This concept should be fairly trivial to implement, and
should be extensible to your situation of nested loops etc...
Hope that helps.
Daniel.
"Steve Teeples" <St**********@discussions.microsoft.com> wrote in message
news:68**********************************@microsof t.com...
I'm hoping someone can provide me with an idea how to approach this
problem I
have. I am writing a test utility that runs multiple tests. While
looping
through and executing each test it is possible that one of the conditions
requires the system to reboot. I want to be able to pick up my tests at
the
point just after the reboot was requested.
I have successfully saved and restored all form control data, but have one
difficulty. The tests are executed within a method having a double loop.
The outer loop executes a "group" of tests. The inner loop executes each
member of that group of tests. How can I save off the status of this
double
loop so that I can pick up right were I left off?
--
Steve