How can I have a particular program run as a service on my Win Server 2003?
Here is a script I found but could not run it properly.
Const OWN_PROCESS = 16
Const NOT_INTERACTIVE = True
Const NORMAL_ERROR_CONTROL = 2
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & _
"{impersonationLevel=Impersonate}!\\" & strComputer & "\root\cimv2")
Set objService = objWMIService.Get("Win32_BaseService")
errReturn = objService.Create("<MY PROGRAM HERE>", _
"<MY PROGRAM HERE>", _
"C:\<MY FOLDER HERE>\<MY EXECUTABLE FILE HERE>", _
OWN_PROCESS, _
NORMAL_ERROR_CONTROL, _
"Automatic", _
NOT_INTERACTIVE, _
".\LocalSystem", "")
Wscript.Echo errReturn