从Python关闭Windows XP服务时出现系统错误1067

时间:2016-03-04 14:03:43

标签: python windows service windows-xp

当我从命令行停止使用net stop [something]的WinXP服务时,它会停止而不会出现错误。但是,当我用Python这样做时:

import subprocess
stop_args = ['net', 'stop', 'TagNet.OPC.DEP']
subprocess.check_call(stop_args)

我收到以下错误:

Service "TagNet.OPC.DEP" is stopping......
System error.
System error 1067
The process finished unexpectedly.
Service "TagNet.OPC.DEP" is successfully stopped.

为什么我得到System error 1067?如何从Python中优雅地关闭服务?

0 个答案:

没有答案