|
permanently running an executable -- alex --
i'm working on a program that keeps track of some programs that always shoud run on the start of the computer (and during it's use). how can i make my program, to run again if it is closed from task manager ? i've seen this on some spyware that hardly i got rid of. |
|
-- Sankalp --
Any program that needs to be continuously running and does not need any user input should be converted into a windows service. Although it is quite possible to kill the windows service itself from the task manager. As a hack, you can create another application with some strange name (say ShellMntr.exe), which will keep monitoring the other application using a timer-you can use GetProcessByName for this. If this application does not find the other program running, you can start the program again-you can use Process.Start or shell.execute for this. This program will poll every say 1 minute and check the other program. If not running, it will restart the program and again start polling for the same. ~Sankalp |
|
-- Cerebrus --
i've seen this on some spyware that hardly i got rid of. And you want to be emulate that behaviour in your own application ? Your experience must've surely made you realize how irritating it is for the user ! |
|
-- alex --
yes, but those programs must always run, and the user is an average user (first i was thinking that he would never look in task manager or end a process and that running the process again after end task wondn't be necessary, but my boss still asks for it) On 7/10/06, Cerebrus <zorg007> wrote: >> i've seen this on some spyware that hardly i got rid of. And you want to be emulate that behaviour in your own application ? Your experience must've surely made you realize how irritating it is for the user ! > |
|
-- Cerebrus --
Then perhaps you can make it so that only users who are Admins can close your application, everyone else will get an "Access denied" error. But this is assuming that your "average users" are not running as Admins themselves. |