Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 140515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:37:41+00:00 2026-05-11T07:37:41+00:00

I have no experience writing batch scripts, but I was wondering if there was

  • 0

I have no experience writing batch scripts, but I was wondering if there was a way to install a .NET Windows service using installutil.exe using such a script, or uninstall the service if it is already installed, ideally with some kind of confirmation that I actually would like to perform the uninstall (e.g. press y to uninstall).

Here are some details:

  • The .exe for the service is located in the C:\Program Files\Data Service directory
  • The script should be in the same directory as the .exe for the service
  • It would be nice to add a simple line to a log file (we’ll call it program.log, also in this directory) after the service has been installed
  • The machine is running Windows Server 2003 with the .NET Framework installed in the default directory C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

If you feel this could be done in a better way it would be nice to hear other suggestions. I could always write a service installer but that is not a priority.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T07:37:42+00:00Added an answer on May 11, 2026 at 7:37 am

    You could setup your service exe to support self registration / unregistration using command line arguments (-i -u etc) instead of writing a batch file to do the same thing.

    Information on creating Self Installing Services In .NET

    http://anotherlab.rajapet.net/2006/06/self-installing-services-in-net.html

    http://www.gotnet.biz/WindowsServiceSelfInstaller.ashx

    Also adding a Setup Project to your solution and having Visual Studio build an install package might be faster.

    How to create a Setup project for a Windows Service in Visual Basic .NET or in Visual Basic 2005

    (VB) http://support.microsoft.com/kb/317421

    (C#) http://support.microsoft.com/kb/816169

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone have experience writing professional OpenGL games on Windows? For the Mac, due
I have zero experience writing applications with Swing, but I have one application with
I don't have any experience writing drivers, but have a decent grasp on architecture,
I have a year's experience writing client code but none with server stuff. I
I have lots of experience of writing php scripts that are run in the
Does anyone have experience writing a Facebook application using GWT with GAE? I'm new
I have a very poor experience in writing batch-files. And I need to do
I was wondering if anyone have experience writing codes in Java while compiling it
I'm newbie in developing apps for smartphones, but have lots of experience writing desktop
So I've done unit testing some, and have experience writing tests, but I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.