does anyone here know of a quick and easy way to restart the current process? I mean, let the process close, and when it closes, restart it again?
the only thing that I can think of is injecting a thread into another process which waits for the program (the injector) to close, before it calls CreateProcess or the like to start it again. this is rather dirty, and would involve injecting into a process that I know will always exist, which will likely be a process that is vital to the operation of Windows (like Explorer.exe). this could also lead to problems, since not all of the APIs used for process injection are supported across platforms. for example, some of them do not exist in Win9x. I suppose I could write my own implementations of them, but I dunno, it just seems dirty to me. if it's the only option I'll have to go for it, but there has to be another way.
any ideas or suggestions are appreciated. thanks in advance.