-
Hi,
does anyone know how it's possible to build a windows service from VB?
In fact, I have a server application (socket) running in background. But I need to let it work even if there is no user logged in. So, I think that the only way is to transform my application into a service (any other solution is welcome).
Any idea??
Many thanks
-
I don't know how to do it in vb, but there are programs out there that turns a normal exe into a service, i have used them before and they work quite well. Well it is simpler than coding it, but depends if you want to know hwo to do it or not.
-
|\|eoblade:do you mean service as in run "before" start up? were would i get a program like this?
~~~~~~~~~~
~~Chenko~~
~~~~~~~~~~
-
Take a look on this Thread
-
After you get the OCX, Juz do it with the following code.
Code:
With NTService1
Select Case Index
Case 0 'Install
.StartMode = svcStartAutomatic
.DisplayName = "My Service"
.ServiceName = "My Service"
.Install
Case 1 ' Uninstall
.ServiceName = "My Service"
.Uninstall
End Select
End With
-
Chris: is it possible to do this in win9x??
#~#~##~#~#
#~Chenko~#
#~#~##~#~#
-
chenko, as for Win9x, you no need the OCX, all you need is juz add you application into the following registry path.
By using the RegOpenKey and RegSetValueEx will do.
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Current Version\RunServices
Cheers!
-
I am using the NTservice.ocx but I need it to connect to network drives to do its job.
how can I get a service that runs as a local admin (I assume) connect to NT domain drives?
please let me know if I am not making any sense.