I have succeeded in getting igor.exe to run as a service. I can telnet to port 1079 and get the Konichwa message. These techniques might be useful for getting other apps to run as services before a user logs on, perhaps the StreamChecker. (Note:I have not tested on XP.)
I have created services in two different ways with two different utilities (one freeware and one not freeware) and there may be other ways to do this in VB.
Freeware Tool
Invoker. Similar to the MS Resource Kit tool SVRANY (below, but I could not get SVRANY to work). Invoker can be downloaded at http://ftp3.ru.freebsd.org/pub/pc/windows/WinSock/invoker.zip.
The command line I used with Invoker is:
invoker install igor7 igor7 c:\tools\igor.exe automatic
Pretty simple.
Shareware Tool ($)
“At Your Service.” This also enabled igor to run as a service. A demo version is at: http://www.prismmicrosys.com/atyourservice/atyourservice-index.htm This tool seems very powerful. The shareware version only runs the service for 7 days.
OTHER VB POSSIBILITIES – ACTIVE X Controls
NTSVC.zip
http://www.montgomerysoftware.com/default.asp?PageID=18
Very Clear article and download about creating a service in VB6. But I haven’t had time to figure this all out.
NT Service OCX
http://www.backupreport.com/pub/ntsvocx/
This looks very interesting. Scott, maybe we could go over this together. I followed the instructions, however, I had some problems, and I do not see how the app starts as a service even after following the instructions.
http://www.montgomerysoftware.com/default.asp?PageID=18
http://www.softbear.com/cpp/ntsvocx/ntsvocx.htm
Other tools which did not work for me
ITSActiveNTService
http://www.interalsoftware.com/products/en/ActiveX/p_ntservice.htm
http://download.interalsoftware.com/activex/itsntsrv.exe - download
VB library which enables an application to run as a Windows NT service. This trial version will run for three consecutive hours
ServiceMill – $195
Well documented utility. Also available as an OCX
http://www.activeplus.com/default.asp?Jump=page:/us/products/smillcontrol/default.asp
SVC
http://www.nick.rozanski.com/services.htm
http://download.cnet.com/downloads/0-10106-100-3954449.html?tag=st.dl.10001-103-2.lst-7-15.3954449 - download
Easy to use, but I got the error message:
“The service did not respond to the control request in a timely fashion.”
AppToService
Command Line Tool similar to SRVANY – Could not get it to work.
GServerany
http://www.advok.com/gservany.html
This tool created an igor service, but did I could not telnet to it.
Microsoft Tools – (Could not get any to work)
SC.EXE
The tool for changing an app into a service is a tool from the W2K Resource Kit called SC.exe. It’s supposed to be pretty simple. The following command creates a service out of notepad.exe:
sc \\dwslabadmin create notepad binPath= c:\Winnt\system32\notepad.exe
[SC] CreateService SUCCESS
I was able to create a service out of igor, but I cannot start it. I always get the error: “The service did not respond to the control request in a timely fashion.”
SC is in the Resource Kit. I have it installed at:
\\dwslabadmin\c$\Program Files\Resource Kit\sc.exe
\\dwslabadmin\c$\Program Files\Resource Kit\scdev.doc – documentation
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q251192 – more documentation
SEVERANY.EXE
A second Microsoft Resource Kit tool is the “SVRANY” tool. I have installed this at
\\dwslabadmin\c$\Srvany\SRVANY.WRI - documentation
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q137890 - More documentation
OTHER RESOURCES
http://vbwire.com/advanced/howto/service2.asp
article on running apps as services
“Running Visual Basic Applications as Windows NT Services”
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q175948
“An OLE Control for Creating Win32 Services in Visual Basic” - June 1996
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnolectrl/html/msdn_ntsrvocx.asp
Extensive examples from Microsoft Corporation
“HOWTO: Create a User-Defined Service (Q137890)”
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q137890
I followed this advice exactly and could not get notepad to run as a service. It installs as a service OK, but then the service times out when you try to start it.