Results 1 to 8 of 8

Thread: How to make a service from VB??

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Location
    Brussels (Belgium)
    Posts
    7

    Question

    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
    _________________________________
    JIEF

  2. #2

    Cool

    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.

  3. #3
    Guest
    |\|eoblade:do you mean service as in run "before" start up? were would i get a program like this?

    ~~~~~~~~~~
    ~~Chenko~~
    ~~~~~~~~~~

  4. #4
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Thumbs up

    Take a look on this Thread

  5. #5
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Thumbs up

    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

  6. #6
    Guest
    Chris: is it possible to do this in win9x??

    #~#~##~#~#
    #~Chenko~#
    #~#~##~#~#

  7. #7
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    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!

  8. #8
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    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.

    Kurt Simons
    [I know I'm a hack but my clients don't!]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width