[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Auto-deleting file

Posted on 1999-01-07
2
Medium Priority
?
140 Views
Last Modified: 2010-04-04
How to write an app that will delete itself
on exit.
0
Comment
Question by:ILPowerSoft
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Accepted Solution

by:
ptiemann2 earned 80 total points
ID: 1355147
Hi, see my technical tip at
http://www.preview.org/q/q2074.shtml

Never mind.. I just copy it here:

Both Windows 95 and NT provide mechanisms for doing just this.

Under Win95 you use the WinInit.ini file. Create a [rename] section and put in entries like "NewName.txt=OldName.txt" to have files renamed, or "nil=OldName.txt" to have them deleted. Windows will perform this at the next boot.

Under Windows NT, the MoveFileEx function has a parameter that allows you to defer the move (or delete) until the next boot. It stores the list of files to be processed in the registry.

To determine whether NT or 95/98.. use GetVersion() - how to do it, see this:

http://www.preview.org/q/q1012.shtml

Good luck,
Peter



0
 

Author Comment

by:ILPowerSoft
ID: 1355148
Thanx, this is it
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question