Answered by:
Windows Service deployment doesn't work

Question
-
Hi,
I have made a windows service and I am trying to deploy it. Problem is, when I load installutil.exe, it comes up but then dissappears too quick for me to even use or read what the prompt says. Also, I can't get the set path in Visual Studio 2008 to be set to any directory other than Visual Studio's. I pasted the service exe (built it, used a setup project), but it doesn't find this. It also complains that the file cannot be found or read, but the directory is not read only.
Is there any easier way to deploy the service? What am I doing wrong?
Thanks
Wednesday, November 5, 2008 5:52 PM
Answers
-
Have you tried running installutil from the command prompt and not from Start->Run window?
Try running "cmd" using Start->Run, and then run installutil from the actual command prompt, then you might see what the error is. Once you do that, come back and let us know what the error is.
David Morton - http://blog.davemorton.net/- Proposed as answer by Peter Ritchie Thursday, November 6, 2008 5:50 PM
- Marked as answer by Michael Sun [MSFT]Microsoft employee Monday, November 10, 2008 5:28 AM
Wednesday, November 5, 2008 5:57 PM -
Did you follow the steps in http://msdn.microsoft.com/en-us/library/ddhy0byf(VS.80).aspx before you ran installutil?
http://www.peterRitchie.com/blog- Proposed as answer by Peter Ritchie Thursday, November 6, 2008 5:51 PM
- Marked as answer by Michael Sun [MSFT]Microsoft employee Monday, November 10, 2008 5:28 AM
Wednesday, November 5, 2008 6:04 PMAlso, http://support.microsoft.com/kb/816169 details the process for creating an setup for a service.
http://www.peterRitchie.com/blog- Proposed as answer by Peter Ritchie Thursday, November 6, 2008 5:51 PM
- Marked as answer by Michael Sun [MSFT]Microsoft employee Monday, November 10, 2008 5:28 AM
Wednesday, November 5, 2008 6:08 PMGSS1 said:I did what you said and installutil comes up, but it disappears so quickly that I can't see what it says. It looks like a list of commands to use (like a guide).
If you did what I said, it wouldn't disappear so quickly that you can't read what it says. The whole point of my post was to get you to a point where you can read what it says. I'll try to be more explicit.
1. Click Start.
2. Click Run.
3. Type "cmd".
4. A black window should come up. In it, type "C:\windows\microsoft.net\framework\v2.0.50727\installutil.exe".
5. Use the scroll bar on the right of the window to read the entire contents of what's printed on the screen.
6. Repeat steps 1-5, replacing the text to type in 4 with the command to install your service.
David Morton - http://blog.davemorton.net/- Proposed as answer by Peter Ritchie Thursday, November 6, 2008 5:51 PM
- Marked as answer by Michael Sun [MSFT]Microsoft employee Monday, November 10, 2008 5:28 AM
Thursday, November 6, 2008 11:24 AMAll replies
-
Have you tried running installutil from the command prompt and not from Start->Run window?
Try running "cmd" using Start->Run, and then run installutil from the actual command prompt, then you might see what the error is. Once you do that, come back and let us know what the error is.
David Morton - http://blog.davemorton.net/- Proposed as answer by Peter Ritchie Thursday, November 6, 2008 5:50 PM
- Marked as answer by Michael Sun [MSFT]Microsoft employee Monday, November 10, 2008 5:28 AM
Wednesday, November 5, 2008 5:57 PM -
Did you follow the steps in http://msdn.microsoft.com/en-us/library/ddhy0byf(VS.80).aspx before you ran installutil?
http://www.peterRitchie.com/blog- Proposed as answer by Peter Ritchie Thursday, November 6, 2008 5:51 PM
- Marked as answer by Michael Sun [MSFT]Microsoft employee Monday, November 10, 2008 5:28 AM
Wednesday, November 5, 2008 6:04 PMAlso, http://support.microsoft.com/kb/816169 details the process for creating an setup for a service.
http://www.peterRitchie.com/blog- Proposed as answer by Peter Ritchie Thursday, November 6, 2008 5:51 PM
- Marked as answer by Michael Sun [MSFT]Microsoft employee Monday, November 10, 2008 5:28 AM
Wednesday, November 5, 2008 6:08 PMSetting up an installer isn't a problem. Getting the service deployed into Services Manager is.
David,
I did what you said and installutil comes up, but it disappears so quickly that I can't see what it says. It looks like a list of commands to use (like a guide).
Peter,
I went on the link you provided and then went to how to install and uninstall services. Everything there is ok (I've done it or it correlates with my code).
Also, I tried this in CMD but no luck:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe FileDeleter.exe
FileDeleter.exe is the name of the service application, do I need to specify a full path to/for the app?
Thanks
- Edited by GSS1 Thursday, November 6, 2008 11:22 AM
Thursday, November 6, 2008 9:59 AMGSS1 said:I did what you said and installutil comes up, but it disappears so quickly that I can't see what it says. It looks like a list of commands to use (like a guide).
If you did what I said, it wouldn't disappear so quickly that you can't read what it says. The whole point of my post was to get you to a point where you can read what it says. I'll try to be more explicit.
1. Click Start.
2. Click Run.
3. Type "cmd".
4. A black window should come up. In it, type "C:\windows\microsoft.net\framework\v2.0.50727\installutil.exe".
5. Use the scroll bar on the right of the window to read the entire contents of what's printed on the screen.
6. Repeat steps 1-5, replacing the text to type in 4 with the command to install your service.
David Morton - http://blog.davemorton.net/- Proposed as answer by Peter Ritchie Thursday, November 6, 2008 5:51 PM
- Marked as answer by Michael Sun [MSFT]Microsoft employee Monday, November 10, 2008 5:28 AM
Thursday, November 6, 2008 11:24 AMHi I've got it to work. Thanks!Thursday, November 6, 2008 5:44 PM