2014-12-03 117 views
2

应用程序使用API​​函数,如:NetScheduleJobAdd,NetScheduleJobEnum,NetScheduleJobGetInfo。 看起来这些功能不适用于Windows 8作业。 创建新作业时出现错误:“请求不受支持”(错误ERROR_NOT_SUPPORTED) AT.exe在Windows 8中也不起作用。显示相同的错误。Windows 8 NetScheduleJobAdd不支持该请求

有关AT命令和Windows 8的文档比较差。 有人可以解释为什么上述功能在Windows 8中不起作用。 有没有其他方法? 也许它与Windows 8中的任务计划程序体系结构中的更改相关联?

+0

看样子你需要设置注册表项启用Windows任务调度8.请参阅https://social.technet.microsoft.com/Forums/scriptcenter/en-US/e0e31d5e-a8e3-4864-a186-86063cd5473c/win32scheduledjob-windows-8?forum=ITCG – 2014-12-03 21:12:56

+0

谢谢,它有助于 – 2014-12-10 17:16:54

回答

0

documentation for Win32_ScheduledJob说:

The Win32_ScheduledJob class is internally using the AT protocol, which is bound to deprecation starting with Windows 8 and Windows Server 2012. As a first step the AT protocol is disabled by default.

把协议重新打开,添加以下注册表项:

Key: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Configuration 
Name: EnableAt 
Type: REG_DWORD 
Value: 1