Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Can anyone create an exe that can kill itself


Message #1 by "Rajasekhar Patta" <pattarajasekhar@y...> on Thu, 30 Aug 2001 14:53:44
I don't see how this would work.  If your application process creates the
thread, when the process ends, so do its threads, so by ending your app, you
kill any child threads.

> -----Original Message-----
> From: Kyle Burns [mailto:kburns@c...]
> Sent: Friday, August 31, 2001 2:20 PM
> To: professional vb
> Subject: [pro_vb] RE: Can anyone create an exe that can kill itself
>
>
> Another way that this can be done (I've only done it in C++) is to, just
> before you end the execution of the program, place a thread on the stack
> that sleeps long enough for your app to unload and then deletes the file.
> This may be too low level to implement in VB, but if I remember correctly
> the C++ code was fairly simple and was actually taken from an
> MSDN example.
>
> =================================
> Kyle M. Burns, MCSD
> ECommerce Technology Manager
>
>
> -----Original Message-----
> From: danielweigel@y... [mailto:danielweigel@y...]
> Sent: Thursday, August 30, 2001 9:07 PM
> To: professional vb
> Subject: [pro_vb] RE: Can anyone create an exe that can kill itself
>
>
> It is funny how the same words can have diferent meanings to diferent
> people. When I read 'an exe that can kill itself' I understood
> 'an exe that
> can erase its own executable file from the disk'. After all, Kill
> in Visual
> Basic remains a statement for erase files. I think Yehuda Rosenblum
> understood the same, more or less. Of course, 'kill an app or process'
> usually refers to just ends the app or process, and that interpretation is
> perfectly possible.
>
> Providing that I untertood correctly the question, I think the answer is
> that windows does not let an exe kill itself because while
> running the file
> is blocked, and cannot be deleted. But, as Yehuda Rosenblum said,
> there are
> ways to do it. One way could be use an uninstaller.
>
> Daniel Weigel
> Ciudad de la Costa
> Uruguay
>
> -----Mensaje original-----
> De: Yu, Kevin [mailto:kyu@N...]
> Enviado el: Jueves, 30 de Agosto de 2001 12:13 p.m.
> Para: professional vb
> Asunto: [pro_vb] RE: Can anyone create an exe that can kill itself
>
> I think the answer is
>
> END
>
> this is a system call, it need help from OS, but if u mean
> it's done in the "suicide" style, then the solution from Yehuda Rosenblum
> is not really what you want.
>
> -----Original Message-----
> From: Yehuda Rosenblum [mailto:Yehuda@I...]
> Sent: August 30, 2001 8:15 AM
> To: professional vb
> Subject: [pro_vb] RE: Can anyone create an exe that can kill itself
>
>
> Yes, though it is a little more complicated.  You have to kill what you
> can of the program and then launch a batch process or another program to
> finish the job.
>
> -----Original Message-----
> From: Rajasekhar Patta [mailto:pattarajasekhar@y...]
> Sent: Thursday, August 30, 2001 10:54 AM
> To: professional vb
> Subject: [pro_vb] Can anyone create an exe that can kill itself
>
>
> Can anyone create an exe that can kill itself

  Return to Index