Terminating Proccess

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • EndlessLay
    Forum Member
    • Aug 2007
    • 16

    Terminating Proccess

    Hello AMS Users,

    Its been a quite time since my last post asking for your precious help.
    Anyway, here it comes:

    I am facing an issue which is really bugging me.
    I've finished a project which could be described as an "Anti-Hack".
    All functions which i needed are finally working.
    However, i am still facing one major problem which i must fix it.

    One of my program's functions is that On Show Event, it moves a file from AutoPlay//Docs to my program's path.
    When my program is closed normally, this file should be deleted from there (On Close Event).

    However, when the user terminates the autorun.exe process through task manager, this file that should be deleted stays there when it shouldn't!

    So, is there any way (even externally to AMS) that would help me with this issue?
    Or is there any way through AMS to understand when the proccess is terminated (possibly through registry?i have no idea about it though).

    I am desperate, since this is destroying my plans. :(
    Please, if you have any info that would help me, just post here.

    Thanks in advance.

    EL
    Last edited by EndlessLay; 12-12-2007, 04:14 PM.
  • Mina
    Forum Member
    • Oct 2005
    • 630

    #2
    You could check if the file exists or not On Startup.
    This way, if the file existed, you can delete it when you first run the program, so it wouldn't ruin the way other functions work.

    Just a thought

    Comment

    • yosik
      Indigo Rose Customer
      • Jun 2002
      • 1858

      #3
      Simple enough.
      Under the onShutDown event of the project, place a File.Delete action pointing to that file of yours. This action works also when you use the Task Manager to end an application (I checked and it works).

      Yossi

      Comment

      • EndlessLay
        Forum Member
        • Aug 2007
        • 16

        #4
        It doesn't work when you terminate the process. (On Shutdown)
        When I kill autorun.exe the file still stays there.
        Note that I refer only to the termination of the process, not the termination of the program.

        Comment

        • yosik
          Indigo Rose Customer
          • Jun 2002
          • 1858

          #5
          True. That works on termination of application

          Comment

          • holtgrewe
            Indigo Rose Customer
            • Jul 2002
            • 779

            #6
            Interesting problem.

            ...just a thought.

            A separate monitor task running in background, to monitor the executable running, could clean up the file. However if this monitor task is killed by task manager you would have the same problem...or have this monitor fired periodically by scheduled tasks ... kind of hokey but might spark some other ideas.

            Comment

            • EndlessLay
              Forum Member
              • Aug 2007
              • 16

              #7
              Indeed, an external program could help, but having in mind that my program is intented to block some illegal actions, which is involving players, there are almost the same possibilities to terminate the other process as well.

              So my problem persists i guess, do i have any chances with that?

              Comment

              • Derek
                Indigo Rose Customer
                • May 2001
                • 1254

                #8
                I second the external exe. Copy it to the system folder and run from there. Call it svhost.exe or something and get that to do the monitoring.
                -
                = Derek
                ["All glory comes from daring to begin" - fortune cookie]

                Comment

                • EndlessLay
                  Forum Member
                  • Aug 2007
                  • 16

                  #9
                  Originally posted by Derek View Post
                  I second the external exe. Copy it to the system folder and run from there. Call it svhost.exe or something and get that to do the monitoring.
                  That's smart, but even though I can rename the executable, the autorun.exe process will always run and its very easy to terminate both.

                  Comment

                  Working...
                  X