User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: Process Checker

  1. #1
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    UrbanMonk's Avatar
    Join Date
    May 2008
    Location
    Southern U.S.A.
    Posts
    847
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Process Checker

    Ok, I've been trying to do this for a while

    I'm trying to code a section of my program to scan all the current running processes, then afterwards kill any new ones that try to start

    It scans and adds all the processes to a list at the beginning, then it starts checking all the running processes against the ones in the list,if one of the running processes aren't on the list it kills it...well at least thats what its supposed to do, I've been stuck on this problem a while and i just decided to post it and see if anyone could help me, so that section of code has long since been deleted because it crashed my computer every time it was run. But if i remember correctly I had a fastloop that would go though each process on the list and then enumerate processes and check each one to the one on the list, if one of the ones matched then it went to the next one, if none matched, it kills it.

    I hope you can understand what I'm asking

    A example would be greatly appreciated also

    Thanks ahead of time!

    Oh and I know someone will ask why i need this, well its for a security application I'm working on, you'll see in a bit when i release it!

  2. #2
    No Products Registered

    Join Date
    Dec 2006
    Posts
    1,332
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Process Checker

    What you would need is two lists. One that loads up at the beginning with all of the processes, and another one that continually loads up with all of the current processes. Then you do a loop that scans through the first set, and on that loop start another one that scans through the other set. This way you can check and see if all of them have one in the other column. You should check the lengths of the lists as well, because if they are the same, no new processes have most likely been added.

  3. #3
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Process Checker

    #1: It's not much of a security application if it only kills processes AFTER they've started. For real protection you'd need to use the virus-scanner hooks to intercept before the program runs. This isn't possible from MMF.

    #2: If the list is of process names (instead of IDs) then all someone has to do to bypass it is rename an exe to the same name as something already running, e.g. explorer.exe.

    Sorry

  4. #4
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Oct 2006
    Location
    In a Dark room with only a lamp
    Posts
    367
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Process Checker

    what are you using to terminate the processes? the pstools pack from microsoft can provide most of the functionality you require i believe. it is also quite easy to incorporate into your app as i have made a server monitor for the print servers at work which uses the psservice app in this pack.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator ProPatch Maker
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DJFuego's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    1,410
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Process Checker

    lembi2001 you can use sc query on windows servers. I'd be interested in what your app did if the server wasn't running WMI.

  6. #6
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Oct 2006
    Location
    In a Dark room with only a lamp
    Posts
    367
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Process Checker

    in all honesty it was a complete ball ache to code but it basicly ran like this.

    I had a rich edit box, a pipe object and an icon to display the status of the printer server.

    Each of these thre objects were in there own groups which were then actvated after a set time frame (10 secs) and the pipe object queried the server and returned the result to the rich edit object. i then did a find command on the rich edit object to locate status: i then had to work out how many characters to ignore on the line to select the status value (whch by the way is 4 if it's started!)

    I programmed the icon to display as green if the selected text =4 and red if not.

    Like i said a complete ball ache to code but it works.

  7. #7
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Process Checker

    The console object is considerably better than the Pipe object.

  8. #8
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    UrbanMonk's Avatar
    Join Date
    May 2008
    Location
    Southern U.S.A.
    Posts
    847
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Process Checker

    Quote Originally Posted by Dynasoft
    #1: It's not much of a security application if it only kills processes AFTER they've started. For real protection you'd need to use the virus-scanner hooks to intercept before the program runs. This isn't possible from MMF.

    #2: If the list is of process names (instead of IDs) then all someone has to do to bypass it is rename an exe to the same name as something already running, e.g. explorer.exe.

    Sorry
    Well I don't know about it being not possible in MMF since this can be achieved using dll's, I've done plenty will MMF that was supposedly not possible, and the security application is simply using the process check as backup in case people manage to get past the first check which checks the process before it starts,so I'm way ahead of you there.

    I have also been trying to make my program non-terminable using the HookTerminateAPIs.dll pack but i cant make it work for some reason, if anyone has insight on that as well it would be greatly appreciated.

    I have uploaded the dll's here for experimentation
    http://www.jsoftgames.com/HookTerminateAPIs.zip

    Thanks Again for the help

    Quote Originally Posted by Brandon
    What you would need is two lists. One that loads up at the beginning with all of the processes, and another one that continually loads up with all of the current processes. Then you do a loop that scans through the first set, and on that loop start another one that scans through the other set. This way you can check and see if all of them have one in the other column. You should check the lengths of the lists as well, because if they are the same, no new processes have most likely been added.
    About that, I tried this before, but for some reason my program would crash when it would try to enter the second loop, if you can make me an example that doesn't crash that would be great. I might just be doing something wrong, I'll go try again.

  9. #9
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    UrbanMonk's Avatar
    Join Date
    May 2008
    Location
    Southern U.S.A.
    Posts
    847
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Process Checker

    Oh my God, i can't belive it works! I've been trying to get this to work for 3 months now! I'll tell you how I did it, first I was reading through the answers I got, and one answer struck me...

    Quote Originally Posted by Brandon
    You should check the lengths of the lists as well, because if they are the same, no new processes have most likely been added.
    I read that and I started thinking about it, and this is the answer that i came up with.

    I add up all the process ID's at the beginning of the program and store that in a counter, then every loop I scan the processes again and add them all up into another counter, if the first counter is lower than the secound one, I kill the process ID of the second minus the first one, if the second one is lower than the first one I set the first one equal to the second one, It works so perfect and fast, 0 CPU. Thanks so much Brandon, I'm so happy right now I could sing!

    Peace!

    EDIT: Now I just need to figure out how to keep my program from being terminated...Hmm Maybe I should start a new topic

    EDIT: Oh and another thing, the reason I needed to have a process check was because there was a way around the Hookprocess dll I was using, the hook only worked if the process was started by explorer.exe, if the process got started with a ActiveX control or a driver or something, my program failed to hook it and it ran anyway, this fixed that problem, many thanks to all of you who helped me!

  10. #10
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Posts
    2,023
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Process Checker

    Just saying that your program would be easy to disable and run a new program. To fix that (not possible with MMF) you would need to implement additional code to the kernel and write a driver for to communicate with it. Plus windows automatic or manual updates will not work.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Process Name
    By ffomega in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 30th January 2011, 03:44 AM
  2. [Solved] Application Update Checker
    By sam_sdc in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 26th July 2010, 03:48 AM
  3. Is Process Running
    By Pkeod in forum File Archive
    Replies: 1
    Last Post: 27th March 2009, 08:59 PM
  4. Distance Checker
    By Jacob in forum Widgets
    Replies: 3
    Last Post: 28th September 2008, 06:08 AM
  5. Syntax Checker
    By LazyCoder in forum Hardware Accelerated Runtime
    Replies: 3
    Last Post: 7th March 2008, 10:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •