2

I have an old software which does some work on domain as soon as it started. (Like sending a message to the server using MSMQ).

This software should start automatically when computer starts. (When anybody logged in actually.)

I used the registry key "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run" to start this application.

The problem is: After a user logged in, this software starts as soon as possible and it gives an error like "Activex bla bla domain object bla bla cannot bla bla". Because something about domain connection is not ready yet. I can't remember the exact time but when a user logged in, after 1 or 2 minutes it becomes ready.

I'm thinking about adding a task using the task scheduler but i don't want to set the delay time. This software must start automatically after everything about domain connection is ready as soon as possible.

I need to create a task using task scheduler which should run automatically when somebody log in but only after it see some event on event viewer.(Like domain connection is ready event?)

I think this can be done by using "triggers" section on task scheduler. But i don't know which event i should use. (and it's id)

2
  • Use a scheduled task. Have you tried?
    – Ramhound
    Commented Mar 22, 2017 at 11:37
  • I don't know the id of event generated when domain connection is ready. I'll use this event on triggers section when creating the task.
    – Trax
    Commented Mar 22, 2017 at 11:41

1 Answer 1

2

Use a startup delayer like this one.

or

Run you app as a service, with automatic delayed start-up type.

2
  • I don't wanna set a time delay. When a domain user logged in, i have to wait something about domain is become ready. Windows must be writing an event when it's become ready. I'll use that event id as trigger when creating a task from task scheduler, and this software will automatically start when domain connection is ready. I cant find out how to do this.
    – Trax
    Commented Mar 22, 2017 at 11:47
  • Use 'run for all users' and that will be the exact effect. Without knowing the exact resource needed, you can't make a more specific determination.
    – Overmind
    Commented Mar 22, 2017 at 11:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .