Author Topic: Problem with scheduled task  (Read 21398 times)

0 Members and 1 Guest are viewing this topic.

Offline neroilo

  • Full Member
  • ***
  • Join Date: Jun 2012
  • Posts: 186
  • Karma: 9
    • View Profile
Problem with scheduled task
« on: February 09, 2013, 08:58:59 am »
I have a problem with a task in my Task Scheduler. It works ok if I run it manually (right-click on the task -> run) , but it doesn't work as a scheduled task.

It should be executed automatically when a certain event id occurs.

In my attachment you'll find the task exported in the xml format + the cmd script I want to run.

Windows 7 X64 Ultimate here.

Ideas?

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Problem with scheduled task
« Reply #1 on: February 09, 2013, 02:10:00 pm »
What user account do you have it running as?

     <UserId>S-1-5-18</UserId>
      <RunLevel>LeastPrivilege</RunLevel>

Also have it run with admin privileges.

Shane

Offline neroilo

  • Full Member
  • ***
  • Join Date: Jun 2012
  • Posts: 186
  • Karma: 9
    • View Profile
Re: Problem with scheduled task
« Reply #2 on: February 10, 2013, 01:21:10 am »
What user account do you have it running as?

     <UserId>S-1-5-18</UserId>
      <RunLevel>LeastPrivilege</RunLevel>

Also have it run with admin privileges.

Shane

S-1-5-18: %systemroot%\system32\config\systemprofile  = SYSTEM
Tried Admin privileges before, no-go.
Even with admin privileges, in status column appears "In queue", but at the end it doesn't do anything.

Of course with the exception that it works if I run the task manually.

You should know that I need this task to fix this recurrent bug:
http://answers.microsoft.com/en-us/protect/forum/mse-protect_start/session-microsoft-security-essentials-oobe-stopped/a6d12dbc-3a81-4059-8516-92057d7f1b8f
« Last Edit: February 11, 2013, 02:29:58 am by neroilo »

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Problem with scheduled task
« Reply #3 on: February 11, 2013, 02:17:37 pm »
The thing with running a scheduled task under the system account is that it wont show on the desktop. Such as with my registry backup program. If I have it run under the system account it wont show on the desktop.

Shane

Offline neroilo

  • Full Member
  • ***
  • Join Date: Jun 2012
  • Posts: 186
  • Karma: 9
    • View Profile
Re: Problem with scheduled task
« Reply #4 on: February 11, 2013, 02:34:52 pm »
The thing with running a scheduled task under the system account is that it wont show on the desktop. Such as with my registry backup program. If I have it run under the system account it wont show on the desktop.

Shane

Well, I don't want this task showed on desktop. It's a simple delete command contained on a cmd script.

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Problem with scheduled task
« Reply #5 on: February 11, 2013, 02:53:55 pm »
Very odd that it isnt working under the system account. Is the file in use?

What you could do is add a log file option to have it output any errors. Might help trace it down :-)

Try this in the bat file

del /f /q "C:\ProgramData\Microsoft\Microsoft Security Client\Support\EppOobe.etl" 2>> C:\error_Log.txt

Shane

Offline neroilo

  • Full Member
  • ***
  • Join Date: Jun 2012
  • Posts: 186
  • Karma: 9
    • View Profile
Re: Problem with scheduled task
« Reply #6 on: February 11, 2013, 03:35:35 pm »
Nope, the error log file is empty.

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Problem with scheduled task
« Reply #7 on: February 11, 2013, 03:36:48 pm »
Yet it works fine when you run it manually from the task scheduler itself?

Shane

Offline neroilo

  • Full Member
  • ***
  • Join Date: Jun 2012
  • Posts: 186
  • Karma: 9
    • View Profile
Re: Problem with scheduled task
« Reply #8 on: February 11, 2013, 03:41:17 pm »
Yet it works fine when you run it manually from the task scheduler itself?

Shane

Tried this moment, and it seems to not work anymore.

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Problem with scheduled task
« Reply #9 on: February 11, 2013, 04:09:30 pm »
Very odd. Not sure why it isnt working for you.

Shane

Offline neroilo

  • Full Member
  • ***
  • Join Date: Jun 2012
  • Posts: 186
  • Karma: 9
    • View Profile
Re: Problem with scheduled task
« Reply #10 on: February 11, 2013, 04:13:16 pm »
Very odd. Not sure why it isnt working for you.

Shane

When I go to the security tab of EppOobe.etl  it shows a message saying "To continue you must be an administrative user with permission to view this object's security properties. Do you want to continue?"

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Problem with scheduled task
« Reply #11 on: February 11, 2013, 04:15:44 pm »
Does the bat file work if you run it directly and not in the task scheduler?

Shane

Offline neroilo

  • Full Member
  • ***
  • Join Date: Jun 2012
  • Posts: 186
  • Karma: 9
    • View Profile
Re: Problem with scheduled task
« Reply #12 on: February 11, 2013, 04:23:57 pm »
Does the bat file work if you run it directly and not in the task scheduler?

Shane

No, now it's completely locked.

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Problem with scheduled task
« Reply #13 on: February 11, 2013, 04:25:05 pm »
Is the file in use? Try turning off Microsoft Security Client and see if you can manually delete it yourself.

Shane

Offline neroilo

  • Full Member
  • ***
  • Join Date: Jun 2012
  • Posts: 186
  • Karma: 9
    • View Profile
Re: Problem with scheduled task
« Reply #14 on: February 11, 2013, 04:26:59 pm »
Is the file in use? Try turning off Microsoft Security Client and see if you can manually delete it yourself.

Shane

Real time protection is disabled, but the problem persists.
I can't assign any type of permission to that file.

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Problem with scheduled task
« Reply #15 on: February 11, 2013, 04:28:07 pm »
What about in safe mode? I knw a lot of protection programs protect their files so viruses cant remove them.

Shane

Offline neroilo

  • Full Member
  • ***
  • Join Date: Jun 2012
  • Posts: 186
  • Karma: 9
    • View Profile
Re: Problem with scheduled task
« Reply #16 on: February 11, 2013, 04:42:17 pm »
What about in safe mode? I knw a lot of protection programs protect their files so viruses cant remove them.

Shane

That worked! After a reboot, a new file was generated with all permissions in their place. Now the task works correctly, both manually and scheduled.
Thank you.  :smiley:

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Problem with scheduled task
« Reply #17 on: February 12, 2013, 10:46:37 am »
No problem :-)

Shane