Ending a process/app automatically after it has loaded

Reverend

Banned
I'm using WinXP.

I have an app that runs automatically when XP loads. I'm wondering if there is a way to terminate the process/app after it (and WinXP) has loaded without manually terminating it by running taskmgr. Note that I do want the app/process to run when WinXP loads.

Thanks.
 
And the App has no selection to exit after running?
 
wait so you don't want to remove it from startup, but you want it to end after XP has started?

and you aren't using *nix where you could have it run as a cron job, i'm thinking jack with task sched maybe, you can get it to start when you log on or when the system boots, and give it a time quota from there (for most apps iirc)
 
You could use a command line process manager and schedule it to run after the program you wish to quit has finished loading (perhaps with the help of a batch file or a script with an appropriate delay to make sure it doesn't try to kill the process too early).
 
@Reverend: You can do it if you create a scheduled task and set it to run at start up. Under Properties -> Settings for the task you can set how long you want the task to run.

Could'nt you use the "MSCONFIG" command in "RUN" and deselect the problem to run at startup?
This is what he wants though. Read the first and third post again...
 
@Reverend: You can do it if you create a scheduled task and set it to run at start up. Under Properties -> Settings for the task you can set how long you want the task to run.

This is what he wants though. Read the first and third post again...

OK, i misread....

Hey im still hungover :p
 
Create an autoit-script, compile it and set it to autorun.

When the autoit app has started, look for the process name of the one you want to close and close it, then you can set the autoit applikation to close itself too. Very simple and could be done in a matter of a few minutes, even for one that has little or no experience with autoit.

Code:
Dim $processName = "whatYouWantToClose.exe"
Dim $start = TimerInit()
 
While 1
	If ProcessExists($processName) or TimerDiff($start) > 60000 Then ;Don't run the script for longer than a minute, if the processname for some reason never exists
		ProcessClose($processName)
		exit
	EndIf
	sleep(100)
WEnd
 
Last edited by a moderator:
@Reverend: You can do it if you create a scheduled task and set it to run at start up. Under Properties -> Settings for the task you can set how long you want the task to run.

didn't think of that, was just thinking task sched, start -> progs -> acces -> sys tool -> sched task

and then pick your task

and then setup an end parameter

i'm guessing tokelil's suggestion is identical window but faster, lol
 
Hey Guys, thanks for the responses.

I came up with a very simple solution myself. I simply created a batch file that I stuck in "Start Up" with the following :

Code:
@ping 127.0.0.1 -n 5 -w 1000 > nul
@ping 127.0.0.1 -n %1% -w 1000 > nul
taskkill /IM the_pp.EXE
exit

Works every time because it looks like the app runs very soon after WinXP loads (I just made the app terminate 5 seconds after the start of the batch file).

Thanks again for the interest.
 
Back
Top