| View previous topic :: View next topic |
| Author |
Message |
xV I post too much
Reputation: 1
Joined: 03 Jan 2008 Posts: 3783 Location: Seattle
|
Posted: Mon Sep 29, 2008 10:30 pm Post subject: [Request] Process Closer |
|
|
Well I have no knowledge in any programming language whatsoever. So I was wondering if someone could make a program that would close a process after a certain amount of time? I don't think it would be that hard, but I have no clue how to make even a simple program.
Please, if someone can do it, can you include the source as well. Thanks in advance.
Edit: If it can be done, a better thing would be to have it close a program at a certain time.
So basically what I want is:
A program that'll close a named process at a inputted time.
_________________
|
|
| Back to top |
|
 |
Overload Master Cheater
Reputation: 0
Joined: 08 Feb 2008 Posts: 293
|
Posted: Mon Sep 29, 2008 10:47 pm Post subject: |
|
|
Why don't you learn yourself
_________________
Blog
| Quote: | Rhys says:
you can be my maid
Rhys says:
ill buy you a french maid outfit
Tyler says:
Sounds good
Rhys says:
ill hold you to that |
|
|
| Back to top |
|
 |
krazedkat I post too much
Reputation: 0
Joined: 29 Aug 2007 Posts: 2255 Location: Hell, Norway
|
Posted: Mon Sep 29, 2008 11:13 pm Post subject: |
|
|
I can make a simple process closer but not a set time :O in VBScript
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Tue Sep 30, 2008 5:19 am Post subject: |
|
|
Get PID of process by looking through snapshots taken by CreateToolhelp32Snapshot. OpenProcess to get a handle to the process. GetTickCount for the timer function and then TerminateProcess to end the remote process.
Now go learn !
|
|
| Back to top |
|
 |
Innovation Grandmaster Cheater
Reputation: 12
Joined: 14 Aug 2008 Posts: 617
|
Posted: Tue Sep 30, 2008 5:58 am Post subject: |
|
|
Kinda like this?
Refresh if you can't see attachment...
Edit:
Included source.
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Tue Sep 30, 2008 8:02 am Post subject: |
|
|
| x0r wrote: | | Slugsnack wrote: | Get PID of process by looking through snapshots taken by CreateToolhelp32Snapshot. OpenProcess to get a handle to the process. GetTickCount for the timer function and then TerminateProcess to end the remote process.
Now go learn ! |
Try not to make a habit of using CreateToolhelp32Snapshot as it doesn't support x64 & is generally slow, instead just use EnumProcesses & GetModuleBaseName. |
And you would use the method here.. ?
http://msdn.microsoft.com/en-us/library/ms682623(VS.85).aspx
| Quote: | for ( i = 0; i < cProcesses; i++ )
if( aProcesses[i] != 0 )
PrintProcessNameAndID( aProcesses[i] ); |
Going through every possible PID o.o
You mention slow.. then I see you have recommended he does it in batch instead. LOL
|
|
| Back to top |
|
 |
Wintermoot Expert Cheater
Reputation: 0
Joined: 08 Nov 2007 Posts: 198
|
Posted: Tue Sep 30, 2008 9:18 am Post subject: |
|
|
| I use Windows scheduler because I'm a rad kid!
|
|
| Back to top |
|
 |
xV I post too much
Reputation: 1
Joined: 03 Jan 2008 Posts: 3783 Location: Seattle
|
Posted: Wed Oct 01, 2008 12:30 am Post subject: |
|
|
| inoobzx wrote: | Kinda like this?
Refresh if you can't see attachment...
Edit:
Included source. |
Yes, thank you very much! I looked at the source kinda.. I don't have any knowledge to any of that and I think it would take too long to learn.
Edit: I'm wondering what unit the delay is in? Like milliseconds, seconds, minutes? Thank you.
_________________
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Wed Oct 01, 2008 12:39 am Post subject: |
|
|
milliseconds
_________________
Stylo |
|
| Back to top |
|
 |
|