Self Destruct Code

S

Steve

Does anyone have any ideas on how to write self-destruct code?

I need to run a one-time procedure the next time a database opens. If the
procedure is successful, the procedure needs to be deleted and the code that
initiated the procedure needs to delete itself.

Thanks for any suggestions!

Steve
 
M

Marshall Barton

Steve said:
Does anyone have any ideas on how to write self-destruct code?

I need to run a one-time procedure the next time a database opens. If the
procedure is successful, the procedure needs to be deleted and the code that
initiated the procedure needs to delete itself.


"Self destruct" code is not a good idea! Changing a code
module is a design time operation, which should not be
performed at run time.

Whatever the one time code does must leave some kind of
tracks behind itself. You can add code to test for the
tracks and skip running the one time procedure if it has
already run.
 
T

Thilo Immel

Steve,
Does anyone have any ideas on how to write self-destruct code?

I need to run a one-time procedure the next time a database opens. If the
procedure is successful, the procedure needs to be deleted and the code that
initiated the procedure needs to delete itself.

Are you writing some malware that you have to delete the code after it
has run one time?

Thilo Immel
 
S

Salad

Thilo said:
Steve,




Are you writing some malware that you have to delete the code after it
has run one time?

Sounds like it. Why give someone like knowledge.
 
R

Rick Brandt

Steve said:
Not at all!!!

It's for a one-time cleanup of data in a database.

Steve

Just create a one field table with a Yes/No field indicating whether the
one-time code has run. Test it at the beginning of the code and set it to True
at the end. There is no need to "destroy" the code.
 
S

Salad

Steve said:
Not at all!!!

It's for a one-time cleanup of data in a database.

That's what I had some concerns about...giving you a method to do a "one
time cleanup" of data. I know people that wouldn't mind if some virus
writers were castrated, had their hands cut off, or simply had a bullet
fired into their brains.

We don't know you. Your request is odd and raises red flags.
 
R

Randy Harris

Salad said:
That's what I had some concerns about...giving you a method to do a "one
time cleanup" of data. I know people that wouldn't mind if some virus
writers were castrated, had their hands cut off, or simply had a bullet
fired into their brains.

Do we have to limit it to just one choice?
 
O

OM

You could probably wire up a relay that was activated by the end of the
code, that set of a lump of C4 or Semtex. That would "self destroy" the
code.

Rob
 
R

rkc

Salad said:
That's what I had some concerns about...giving you a method to do a "one
time cleanup" of data. I know people that wouldn't mind if some virus
writers were castrated, had their hands cut off, or simply had a bullet
fired into their brains.

We don't know you. Your request is odd and raises red flags.

Isn't the op just PC Datasheet without the advertising?
 
M

MikeB

Steve said:
Not at all!!!

It's for a one-time cleanup of data in a database.

Write it in VBScript and call it from your app using the Shell function. The VBScript can self destruct
upon completion.
 
S

Steve

Is this one of those Al Quida solutions?


OM said:
You could probably wire up a relay that was activated by the end of the
code, that set of a lump of C4 or Semtex. That would "self destroy" the
code.

Rob
 
S

Steve

That's right!

And Salad is either a close relative of Don Mellon or someone with the brain of
a cabbage patch doll.

Steve
 
T

Tony Toews

Steve said:
Are you related to Don Mellon? Seems the two of you are cut from the same mold!

Not from what I've seen.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 

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