|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Installing a windows serviceI've created a windows service and tested it. It works the way I want
it to. I added a ProjectInstaller and set the appropriate properties in my Windows Service project. To install it, I went to a Visual Studio Command Prompt and issued the appropriate InstallUtil <path\executable> command and the service runs perfectly on my development machine. What I can't figure out is how to install on it any other machine. Any pointers or links to information would be appreciated, I've search the 'net and this newsgroup and haven't found an answer. BK wrote:
> I've created a windows service and tested it. It works the way I want This may not be what you want, but I used the code at this link:> it to. I added a ProjectInstaller and set the appropriate properties > in my Windows Service project. To install it, I went to a Visual > Studio Command Prompt and issued the appropriate InstallUtil > <path\executable> command and the service runs perfectly on my > development machine. What I can't figure out is how to install on it > any other machine. Any pointers or links to information would be > appreciated, I've search the 'net and this newsgroup and haven't found > an answer. http://tinyurl.com/yexh6z to make my service self-installable. It adds a /install and /uninstall switch to be able to install the service. You can use this code and then add a step to your install project to get the service to install itself. Chris ^^^ What he says. :-)
I make every windows service self-installable now. Saves a lot of hassle. It is also possible to create a single exe that can be a service *and* a stand alone app. If you want to get super-creative you can make your exe also behave as a console listener for the service if the service is installed and running. -Blake Show quoteHide quote On Dec 8, 9:25 am, "Chris Dunaway" <dunaw***@gmail.com> wrote: > BK wrote: > > I've created a windows service and tested it. It works the way I want > > it to. I added a ProjectInstaller and set the appropriate properties > > in my Windows Service project. To install it, I went to a Visual > > Studio Command Prompt and issued the appropriate InstallUtil > > <path\executable> command and the service runs perfectly on my > > development machine. What I can't figure out is how to install on it > > any other machine. Any pointers or links to information would be > > appreciated, I've search the 'net and this newsgroup and haven't found > > an answer.This may not be what you want, but I used the code at this link:http://tinyurl.com/yexh6zto make my service self-installable. It adds > a /install and /uninstall switch to be able to install the service. > > You can use this code and then add a step to your install project to > get the service to install itself. > > Chris I was looking for a managed code solution, or even just a way to
manually install the service on another machine. This service will only be used on one machine, perhaps a few machines at some point down the road. For now, I need to find a way to install it on to a machine easily, it doesn't even have to happen programatically. Thanks in advance, BK Just write values to the registry....
"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MyService", "DisplayName", "My Program Description" "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MyService", "ErrorControl", 1 "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MyService", "ImagePath", "C:\MyExe.exe" "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MyService", "ObjectName", "LocalSystem" "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MyService", "Start", 2 "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MyService", "Type", 272 The Grand Master BK wrote: Show quoteHide quote > I was looking for a managed code solution, or even just a way to > manually install the service on another machine. This service will > only be used on one machine, perhaps a few machines at some point down > the road. For now, I need to find a way to install it on to a machine > easily, it doesn't even have to happen programatically. Thanks in > advance, > > BK This article cleared it all up:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvsdev05/html/vs05d1.asp Thanks for the replies.
DataTable FillSchema error - Pulling my hair out!
Populating combox from dataset Is this a bug I see before me, or an incomplete understanding of scope? Namespace for stdole? Shared textfile...threading simple question Look at this debugging output about TreeViews Drop shadow under image Re: Turn off deprecated warnings? Re: Turn off deprecated warnings? |
|||||||||||||||||||||||