auto-delete the application...

T

taroz

Hi,


I'm trying to create an installation package that auto delete itself
after the execution.

The problem is when execute the command --> cmd /c "rd [MyDir] /s /q"
<--.

I used the "spawn" function with option P_NOWAIT and passing the
application path c:\windows\system32\cmd.exe with the argument "rd
[MyDir] /s /q".
Doing this exaclty after the application->terminate() (or in the
"Destroy" event of the form)instruction everything seems work, but I
find that the command erase all the files and folder inside but not
the directory "[MyDir]", leaving that empty.

I know that is not a really good solution; maybe should be better if
the spawn function can execute the "cmd.exe" application in a deferred
way...

Does anyone know a different (better) way to do it?

P.S.
I work with Borland C++ builder, but I think that with other
environment is the same.

Thanks
 
V

Victor Bazarov

taroz said:
I'm trying to create an installation package that auto delete itself
after the execution.

[.. off-topic..]

P.S.
I work with Borland C++ builder, but I think that with other
environment is the same.

Then please ask in the appropriate one from 'borland.public.*' family
of newsgroups. Another possibility is to ask in the newsgroup for
your OS. In C++ language there is no concept of "delete after
execution".

V
 
T

taroz

taroz said:
I'm trying to create an installation package that auto delete itself
after the execution.
[.. off-topic..]
P.S.
I work with Borland C++ builder, but I think that with other
environment is the same.

Then please ask in the appropriate one from 'borland.public.*' family
of newsgroups. Another possibility is to ask in the newsgroup for
your OS. In C++ language there is no concept of "delete after
execution".

V

ok, thank you and sorry...
 

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

Members online

Forum statistics

Threads
474,201
Messages
2,571,049
Members
47,655
Latest member
eizareri

Latest Threads

Top