C# Windows Service
-
Hello all, I am writing a windows service that I plan to run in a machine that has the .net framework but without the .net ide. I am curious as to how i will go about installing the service if i can not access the visual studio .net command prompt? Any help would be appreciated... Frank
-
Hello all, I am writing a windows service that I plan to run in a machine that has the .net framework but without the .net ide. I am curious as to how i will go about installing the service if i can not access the visual studio .net command prompt? Any help would be appreciated... Frank
All tools for installing .NET services are in the .NET Framework. InstallUtil.exe is the one you want. located in: %WINDIR%\Microsoft.NET\Framework\%version%\InstallUtil.exe
Jonathan 'nonny' Newman blog.nonny.com [^]
-
Hello all, I am writing a windows service that I plan to run in a machine that has the .net framework but without the .net ide. I am curious as to how i will go about installing the service if i can not access the visual studio .net command prompt? Any help would be appreciated... Frank
Besides what Johnny said, you'll also need to implement an
Installer
class that uses theServiceInstaller
and theServiceProcessInstaller
. If you use the VS.NET designer to create this, they should already be there. Just tweak the properties to get what you want (like a display name and under which credentials to run it). If you didn't use VS.NET to create this (using the Add->Windows Service method), you'll need to create these yourself, but it isn't hard. See the documentation for these two classes for examples.-----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----