Board index » delphi » Self deleting Program

Self deleting Program

I've wrote a Win3.1 installer and have one last bug :-).  Does anyone
know how to have a program running of the hard drive delete itself?
The installer can cleanup all its temporary files except delete
itself.  I would like the installer to remove itself from the
harddrive when complete.  The installer runs off the harddrive because
it installs from multiple diskettes.

/Tim
                     ~~~~~~~~~~~~~~~~
                     Timothy Sullivan
                     t...@po.cwru.edu
                     ~~~~~~~~~~~~~~~~

 

Re:Self deleting Program


In article <4i7h9q$...@madeline.INS.CWRU.Edu> t...@po.cwru.edu (Timothy P. Sullivan) writes:

Quote
>I've wrote a Win3.1 installer and have one last bug :-).  Does anyone
>know how to have a program running of the hard drive delete itself?
>The installer can cleanup all its temporary files except delete
>itself.  I would like the installer to remove itself from the
>harddrive when complete.  The installer runs off the harddrive because
>it installs from multiple diskettes.

You generally cannot do this because Windows obtains a write-lock on the
program file and any open DLLs.  It may have to swap in resources or program
segments at any time.  In addition, some network operating-systems impose even
more stringent requirements in defense against viruses.

/mr/

Other Threads