Install windows service user
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Question
I want to install the windows service using DOS Prompt(not Visual Studio command prompt).
plz help me will be appriciated
Answers
Sorry for the confusion, you still need to invoke installutil in order to install your service, there’s no other way to do this if you dont have the .Net Framework runnig on your machine. The alturnatives if you are using normal CMD are :-
1. On VS 2003 :- C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\InstallUtil.exe C:\MyService.exe
2 On VS 2005 Express :- C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe C:\MyService.exe
Hope this Helps
All replies
In VStudio command prompt run :- installutil
(e.g installutil C:\MyService.exe)
Im not sure if normal DOS cmd can do this.
Hope this helps.
plz read once again my question.
I want to install windowsService from command Prompt.
Not from VisualStudioCommandPrompt.
Sorry for the confusion, you still need to invoke installutil in order to install your service, there’s no other way to do this if you dont have the .Net Framework runnig on your machine. The alturnatives if you are using normal CMD are :-
1. On VS 2003 :- C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\InstallUtil.exe C:\MyService.exe
2 On VS 2005 Express :- C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe C:\MyService.exe
Hope this Helps
I have tried the above steps, but the problem is that I am having Windows XP and it doesnot recognize InstallUtil via command prompt. Is there any alternative command which I can use instead of InstallUtil.
You need to have atleast the .Net Framework installed ( i guess your service is .net and hence would need it anycase rt)
After that go to your .Net framework folder under windows directory and run the installUtil application to register the service.
Thanks n Regards
Anu Viswan
Check if .NET framework 2.0 is installed. u can find the folder C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 folder. Just use the installutil.exe utility from this folder and install the service.
I can understand your problem..
InstallUtil is a Visual Studio command and so it wont recognise in the command prompt in Windows XP since a path to it has not been set..
So you have to set a path for this command so that windows may recognise it.
Try these steps:
1. Right Click ‘My Computer’ in your desktop.
2. goto Properties -> Advanced -> Environment Variables
3. Find the ‘Path’ variable in system variables and click EDIT.
4. Add this path C:\Program Files\Microsoft Visual Studio 9.0\VC\; to you existing path.
5. Restart cmd and type installutil at command prompt. If it works correctly, some text would scroll up in the command window.
Remember you need to append this path to the existing path variable. This means that if a semicolon is not there at the end of the existing path, dont forget to first type a semi colon ‘ ; ‘ and then add the path in step 4.
If .NET is installed in some other drive, give the appropriate path..
Hope this helps !! Always mark the post that helped you as «Answer». That helps future users to locate answers quickly.