0

this answer was perfect for me but i m unable to set TriggerType property to TaskTriggerType.Logon. As error description say its a read only. How do i can set this property so that my exe runs everytime when users login?

I need Logon Event with one time scheduled.

Community
  • 1
  • 1
ArjunArora
  • 986
  • 3
  • 12
  • 27
  • 1
    Aren't there specific concrete types for each type of trigger? So, rather than creating a `DailyTrigger` and then changing it's type, wouldn't you create a `LogonTrigger`? – Damien_The_Unbeliever Mar 14 '16 at 11:26
  • @Damien_The_Unbeliever, Yes i was about to comment that by updating my code to td.Triggers.Add(new LogonTrigger() { Enabled = true }); works correctly. Thanks for your comment – ArjunArora Mar 14 '16 at 11:30

0 Answers0