Starting created service using sc.exe throws error: "[SC] StartService FAILED with error 129."

Starting created service using sc.exe throws error: "[SC] StartService FAILED with error 129."

我使用以下命令创建服务:sc create MyService binpath= "C:\Path\MyDriver.sys",返回的消息是:[SC] CreateService SUCCESS,但是一旦我想使用:sc start MyService 启动该服务,我得到错误: [SC] StartService FAILED with error 129.。您知道如何修复此错误并正确启动服务吗?我看过 this,但没有正确答案。提前致谢。

错误代码 129 是 ERROR_CHILD_NOT_COMPLETE(即应用程序不能在 Win32 模式下 运行)。您创建了一个用户模式服务,因为默认值为 type= own(即调用 WinAPI CreateService 时为 SERVICE_WIN32_OWN_PROCESS)。但是,您正在尝试 运行 一个内核模式驱动程序,它应该是 type= kernel(即 SERVICE_KERNEL_DRIVER)。