Results 1 to 6 of 6

Thread: creating windows service

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2007
    Posts
    153

    creating windows service

    hi to all,
    i want to create the windows service in c# Application . and also i want to call the windows form in the onstart of windows service. how can i create the windows service and how to execute that. can i create the more than one windows service with the same name?. if anybody know plz help me. plz help me .

    thank u.
    with thanks and regards
    mmary

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: creating windows service

    Are you using Visual Studio? I believe it includes a template project for creating Windows services.

    Also, services are generally designed to function without user interaction. What do you need a form for?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Feb 2007
    Posts
    153

    Re: creating windows service

    hi, thank u for ur kind reply. i know there is no customer interaction in the service. i need to do some function in the onstart of the service. how can i do that . i was created windows service , but it is not opened when the system is boot up. how can i solve the problem> . plz help me to solve the problem

    thank u
    with thanks and regards
    mmary

  4. #4
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: creating windows service

    You have to set services to run on startup using the Services management console.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Feb 2007
    Posts
    153

    Re: creating windows service

    thank u for ur reply.how can i do that using the coding?

    with thanks and regards
    mmary

  6. #6
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: creating windows service

    Where you install your services using the ServiceInstaller class, specify Automatic start up mode.

    Code:
    ServiceInstaller s = new ServiceInstaller();
    s.StartType = ServiceStartMode.Automatic;

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