Creating Batch File to install windows service.
Posted on 2010-08-16
I have a windows service that I have written and I am installing it using windows InstallUtil.exe from the command line. Every time I make a change to the code and rebuild I have to go to the command line and uninstall then reinstall again, and this is getting old fast. Am I able to write a batch file that will accomplish the the following steps that I'm doing manually? (I am a newbie to batch files)
1. Use cmd line to navigate to the dir where my service and installutil.exe are located.
2. Type in installutil -u myservice.exe
3. Type in installutil myservice.exe
4. Window pops up asking for username and the password (two textboxes for password)
After googling, I think I got the jest of writing what I need, except for the username password part. How would I achieve that step in a batch file?