Erik Porter's Blog

Life and Development at Microsoft and Other Technology Discussions

News

    Testing Windows Services

    To help a fellow blogger and hopefully other people who read that thread, I posted 4 simple 1 liner bat files to Install, Uninstall, Start & Stop Windows Services that you have created.  Just a handy reference!  :)

    Not, simply creating a Windows Service in .NET, then running those scripts won't work.  You must also add a System.Configuration.Install.Installer to your project.

    Along these lines though, I will make one suggestion.  When creating a Windows Service, VS.NET really doesn't provide any nice way to test the service, so I would suggest just keeping your code for your service in a Class or a WindowsForm to do all of your testing.  Once you've got it working how you'd like, then turn it into a WindowsService and install it for final testing.

    Comments

    Jason Gaylord said:

    Thanks to Erik and everyone who gave input to my issue. I actually have created a utility to help install, uninstall, start, and stop a service. I will post the utility on my website and in my blog!

    Thanks Again!
    # April 30, 2003 7:50 PM

    TrackBack said:

    MyMail Mail Server : Jason Gaylord's Blog
    # April 30, 2003 8:26 PM

    D. Sunil Kumar said:

    Jason Gaylord, can you please the utility that you had mentioned in your feedback on your site will be great.

    Thanks,

    Regards,
    Sunilkd
    # February 11, 2004 7:32 AM