dahall / TaskScheduler

Provides a .NET wrapper for the Windows Task Scheduler. It aggregates the multiple versions, provides an editor and allows for localization.
MIT License
1.22k stars 194 forks source link

using taskscheduler with a user without a profile loaded #894

Closed rismoney closed 3 years ago

rismoney commented 3 years ago

Is this possible or a bug that can be fixed?

I think what happens with an administrator logon without a profile (and the reghive not being present) is that the com object lookup isn't performed.

System.Runtime.InteropServices.COMException (0x800703FA): Retrieving the COM class factory for component with CLSID {0F87369F-A4E5-4CFC-BD3E-73E6154572DD} failed due to the following error: 800703fa Illegal operation attempted on a registry key that has been marked for deletion. (Exception from HRESULT: 0x800703FA).

Thank you!

dahall commented 3 years ago

You are correct. If you specify a user in either task registration or for a logon trigger, and that user does not have a local registry hive, you will get error like the one you're seeing. There is no work-around. :(