# 你又写错了

Posted by 小吴 on July 17, 1998 at 16:20:24:

In Reply to: About NTsvr.OCX..... posted by Kingkong on July 17, 1998 at 11:30:39:

If Command = "-install" Then
' enable interaction with desktop
NTService1.Interactive = True
NTService1.Install

===================================
NTService1.ControlsAccepted = svcCtrlPauseContinue
NTService1.StartService
===================================
^^^^^^^^^^^^^^
你怎么可以把 StartService 写在这里？Sample 里面不是写得很清楚吗？这段程式要往后移。

Install Service 和执行 service 是不一样的。Install 完就该结束，而执行 service 则是由 OS 去启动。

End
ElseIf ....

Follow Ups: