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
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