我正在尝试从任务计划程序启动一项任务。该任务基本上会运行“runas /savecred /user:abc job.bat”来启动一个进程。但是它失败了。我在事件日志中发现了此错误消息,我认为它可能与此有关。
Log Name: Application
Source: Application Error
Date: 3/10/2015 1:52:39 AM
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: WIN-PLMLT7HVCLA
Description:
Faulting application name: cmd.exe, version: 6.2.9200.16384, time stamp: 0x50108a15
Faulting module name: KERNELBASE.dll, version: 6.2.9200.17046, time stamp: 0x53b4864c
Exception code: 0xc0000142
Fault offset: 0x00000000000e2000
Faulting process id: 0x1114
Faulting application start time: 0x01d05ad4e3fc0903
Faulting application path: C:\Windows\system32\cmd.exe
Faulting module path: KERNELBASE.dll
Report Id: 21ad5685-c6c8-11e4-945e-062e57f301ba
Faulting package full name:
Faulting package-relative application ID:
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2015-03-10T01:52:39.000000000Z" />
<EventRecordID>14096</EventRecordID>
<Channel>Application</Channel>
<Computer>WIN-PLMLT7HVCLA</Computer>
<Security />
</System>
<EventData>
<Data>cmd.exe</Data>
<Data>6.2.9200.16384</Data>
<Data>50108a15</Data>
<Data>KERNELBASE.dll</Data>
<Data>6.2.9200.17046</Data>
<Data>53b4864c</Data>
<Data>c0000142</Data>
<Data>00000000000e2000</Data>
<Data>1114</Data>
<Data>01d05ad4e3fc0903</Data>
<Data>C:\Windows\system32\cmd.exe</Data>
<Data>KERNELBASE.dll</Data>
<Data>21ad5685-c6c8-11e4-945e-062e57f301ba</Data>
<Data>
</Data>
<Data>
</Data>
</EventData>
</Event>
如果我runas /savecred /user:abc job.bat
直接在 DOS 提示符下运行,它可以正常工作。
我无法直接运行它的原因abc
是它使用了 MS Office COM 对象。当它尝试打开 powerpoint 文件时,它会抛出此异常:
Error HRESULT E_FAIL has been returned from a call to a COM component
有沒有方法可以使其工作?