3 Replies Latest reply on Jul 7, 2006 12:44 PM by Mark Jeffery

    Deploying Custom Windows Services

      I am attempting to deploy a custom windows service using installutil.exe. I began by deploying all of the files necessary to install the application and then running installutil.exe in order to install the service. this works fine if the service is not currently installed. However, I want to be able to have the BLPackage and/or script first check if the service is installed. if it is currently installed, I need to be able to uninstall the application, then reinstall it.


      Any ideas on how to do that?

        • 1. Re: Deploying Custom Windows Services
          Mark Jeffery

          Hi Len!


          You could, of course write a little bit of vbs code to see if the service is installed, and then use some if then else to add the service if necessary, but it might be nicer to package this all up using BladeLogic.


          A nicer approach is to browse a server after a successful install, right click on the service, and add it to the depot as a blpackage.


          The order you have this is vital. If the service needs a specific local account, or relies on an executable, then you should add those, and then place them before the service in the blpackage.


          I just tried this with some files, and a service, and it deployed and rolled back fine. It should deploy, even if the service exists, and it should leave the service as it was on rollback (I didn't give this a go).




          Edit: After reading your message, I thought I should make it clear that this would entail packaging up the app using a blpackage, rather than installutil. you might be able to do some sort of hybrid by just installing the file, but not creating the service.


          Message was edited by:

          Mark Jeffery

          • 2. Re: Deploying Custom Windows Services
            Bill Robinson

            I like Mark's way - but.....you could also do this w/ some batch scripting as well - do a "net start | findstr " (this assumes the service is running) - if it's there and running you could skip your install.

            • 3. Re: Deploying Custom Windows Services
              Mark Jeffery

              I definitely prefer the blpackage way (probably because it is more the BladeLogic "way"!


              Message was edited by:

              Andrew Knott