Schedule the launch of a program

  • Thread starter Thread starter Marcus
  • Start date Start date
M

Marcus

I have this application I have made that I launch when the user logs
into Windows XP.
I would like to delay the launch of the application so that it starts 1
minute after the user has logged in.

I previously did this with a sleep at the first row of the source code,
but this makes the process visible in the task manager's processes tab
during the sleep (before the "real application" is actually running),
and I dont want that.

Can I somehow schedule the start of the application, either via a
command line tool or from code (c#) or in some other way?
 
Thanks for answering...

but doesn't the pause command demand interaction from the user, Like
"press any key to continue"? If that is the case then I can not use
that.

DL skrev:
 
How about scheduling the process to run using the "AT" command, and
specify the time you want it to run on the command line, like so:

at 8:01 /interactive notepad.exe

John
 
I have this application I have made that I launch when the user logs
into Windows XP.
I would like to delay the launch of the application so that it starts 1
minute after the user has logged in.

I previously did this with a sleep at the first row of the source code,
but this makes the process visible in the task manager's processes tab
during the sleep (before the "real application" is actually running),
and I dont want that.

Can I somehow schedule the start of the application, either via a
command line tool or from code (c#) or in some other way?

Just write a small stub program that submits an 'AT' command during
startup.
You could even make it generic by having parameters for the pause and
executed application, and setting those in your Program Files/Startup entry
(or your registry Load setting)

I hope you're not asking this for some malicious purpose.

Cheers,
Gadget
 
This idea with AT command seems to be what I need. I have this big
problem though. I dont have mstask.exe on my win XP pro computer. I
have IE 6 installed also, but no mstask.exe. I dont know how to get
that one. I googled for it about an hour now...

Gadget skrev:
 
OK, I missed the /interactive parameter to the AT command.
Now it works (odd, because I cant seem to find mstask.exe anywere on my
drive).

And NO, it is not for some malicious purpose I want to do this. I am
using CPAU to run my application as administrator and somehow CPAU
freezes and doesnt launch my app if It tries to soon after logon (thats
why I want the delay), the app is a parental software that a limited
user should not be able to stop.
I really doesn't want this timing dependency, but I haven't come up
with any other way of doing it.

Thank you all for helping out.

Marcus skrev:
 
batfile would contain

ping -n 61 127.0.0.1

before the line that starts the program in question, to effect a 60
second delay
 
Marcus,

Is there a reason you can't disable access to the Task Manager for the
limited user??
(I'm assuming it's the kids!?)

That would enable you to run your delay in code, using sleep, and not have
the user able to kill it using Task Manager.
____________________________
The Grim Reaper
 
Back
Top