Scheduled tasks won´t run on cloned images

T

The Rob

Hi group!

I am facing a problem with Scheduled Tasks on my cloned images - they simply
won´t run.
It works perfectly on the image before it is resealed.

The error I see in SchedLgU.txt is: *ERROR*
"The attempt to retrieve account informationfor the specified task failed;
therefore, the task did not run. Either
an error occurred, or no account information existed for the task.
The specific error is:
0x8004130f: No account information could be found in the Task Scheduler
security database for the task indicated."

I have tried several ways of running this service, but it seems like the
logged on Administrator account is the only valid account for starting the
service.
(BTW, I have only an Administrator account and no others).

However, if I manually go to Scheduled Tasks --> Properties and re-type the
password for the account running this task it works.
Unfortunately this would not work very well, it must work automatically.

In TD, System Cloning Tool component is set to generate computer name
(cmiGenerateComputerName) for each clone and I run
"fbreseal -autologon -keepnet -keepuser" when resealing the image.

I would rather not re-build the image from TD, so I hope there is an other
way to fix this.

This image was built using SP2 and updates until at least Oct-Nov (not sure
at the moment). Winlogon based.

Any help would be greatly appreciated.

Thanks in advance,

Rob
 
K

KM

Rob,

I don't know whether the behavior you described is a bug or not. Possible
explanation could be that changing user SID (fbreseal) leads to a mismatch
of the account that password is cached for in scheduled tasks.
Did you try "-keepall" switch of fbreseal?

Anyway, you can always repair scheduled task in automated way if you set up
a post-reseal FBA command to launch schtasks.exe utility. It belongs to
":Server Command Line Tools" component (for some unknown reason the actual
file name is renamed/misspelled to sctasks.exe in XPe repository). This
command supports resetting password for a scheduled task. Here you will find
the full command line description for the tool:
http://support.microsoft.com/kb/814596.


Regards,
KM
 
T

The Rob

KM,

Many thanks for your reply.

Problem solved, but in a little different way than you suggested.

I were actually thinking about the SID´s being changed was the problem. I
guess that was confirmed when running NewSID from SysInternals
(www.sysinternals.com), exact same problem.
No, I did not try "fbreseal -keepall", but changed some/all settings of
Fbreseal in registry
[HKLM\SYSTEM\ControlSet001\Control\WindowsEmbedded\FBReseal] which should be
the same if all settings are set to 0.

Since this image is ready for duplication and there is no time of going back
to TD to try the suggested FBA commands, I instead did the following:

Running "schtasks /change /tn TASKNAME /rp PASSWORD" results in the system
asking for the Run As Name upon boot, and since I wouldn´t know the computer
name because of cmiGenerateComputerName=1 this didn´t work very well.

So, here is what I did:

Set up a RunOnce key to do this task in
[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
New String Value: RG_SZ Value name: schtasks Value data:
c:\windows\system32\schtasks.exe /change /tn TASKNAME /ru "NT
AUTHORITY\SYSTEM" /rp PASSWORD

Run fbreseal.exe.
Copy the resealed image to the target.
The cloned image boots up, changes the task settings without any action from
the user, and the scheduled task runs!!! ;-)

Thanks again for your help KM!

BR,
Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top