By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,677 Members | 1,237 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,677 IT Pros & Developers. It's quick & easy.

auto-delete the application...

P: n/a
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

Aug 27 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
taroz wrote:
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
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Aug 27 '07 #2

P: n/a
On 27 Ago, 15:38, "Victor Bazarov" <v.Abaza...@comAcast.netwrote:
taroz wrote:
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
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
ok, thank you and sorry...

Aug 27 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.