<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Excellent! We really need windows service wrappers for the various exe's.<BR>
 <BR>
A couple of pointers:<BR>
 <BR>
1) Since this is (in practice) a windows-only project, you should implement this as a 'forge' project;<BR>
<A href="http://forge.opensimulator.org/gf/">http://forge.opensimulator.org/gf/</A><BR><BR>
2) To be able to do so, you should implement the services as 'wrappers', separate applications that _use_ the Main Classes, not change or expand on them, like for example for the grid service wrapper:<BR>
 <BR>
    partial class GridServ : ServiceBase<BR>    {<BR>        private GridServerBase m_gridApplication;<BR><BR>
        protected override void OnStart(string[] args)<BR>        {<BR>            // Define working directory (For a service, this is set to System dir by default...)<BR>            Process pc = Process.GetCurrentProcess();<BR>            string useDirectory = pc.MainModule.FileName.Substring(0, pc.MainModule.FileName.LastIndexOf(@"\"));<BR>            Directory.SetCurrentDirectory(useDirectory);<BR>
            log4net.Config.XmlConfigurator.Configure();<BR>
            m_gridApplication = new GridServerBase();<BR>
            m_gridApplication.Startup();<BR>        }<BR>   }<BR>
 <BR>
(This snippet taken from Tribal Medias proprietary service wrappers - feel free to copy+paste.)<BR>
 <BR>
3) When you've done the wrappers, the next step is to add a method to communicate with the consoles. One way to go about it is to have the service process redirect the console in and output to a named pipe, and then supply a console app that listens/writes to those pipes.<BR>
<BR>Best regards,<BR>Stefan Andersson<BR>Tribal Media AB<BR><BR><BR>

<HR id=stopSpelling>
<BR>
Date: Sat, 20 Dec 2008 19:53:32 +0100<BR>From: Develope@Ashuan.de<BR>To: Opensim-dev@lists.berlios.de<BR>Subject: [Opensim-dev] Feature Request ...<BR><BR><BR>
<STYLE>
.ExternalClass p.EC_MsoNormal, .ExternalClass li.EC_MsoNormal, .ExternalClass div.EC_MsoNormal
{margin-bottom:.0001pt;font-size:11.0pt;font-family:'Calibri','sans-serif';}
.ExternalClass a:link, .ExternalClass span.EC_MsoHyperlink
{color:blue;text-decoration:underline;}
.ExternalClass a:visited, .ExternalClass span.EC_MsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
.ExternalClass span.EC_EmailStyle17
{font-family:'Calibri','sans-serif';color:windowtext;}
.ExternalClass .EC_MsoChpDefault
{font-size:10.0pt;}
@page Section1
{size:612.0pt 792.0pt;}
.ExternalClass div.EC_Section1
{page:Section1;}
</STYLE>

<DIV class=EC_Section1>
<P class=EC_MsoNormal>Hi Friends,</P>
<P class=EC_MsoNormal> </P>
<P class=EC_MsoNormal><SPAN lang=EN-US>i wish to implement the feature to run all Gridcomponents (Userserver, Assetserver ....) as a Service.</SPAN></P>
<P class=EC_MsoNormal><SPAN lang=EN-US>My work is now only to evaluate how easy or not it is ... it is easy .. but ...</SPAN></P>
<P class=EC_MsoNormal><SPAN lang=EN-US> </SPAN></P>
<P class=EC_MsoNormal><SPAN lang=EN-US>I must add an Reference to the System.ServiceProcess in several Project.</SPAN></P>
<P class=EC_MsoNormal><SPAN lang=EN-US>Now my question ... </SPAN></P>
<P class=EC_MsoNormal><SPAN lang=EN-US> </SPAN></P>
<P class=EC_MsoNormal><SPAN lang=EN-US>Is there a Problem doing this?</SPAN></P>
<P class=EC_MsoNormal><SPAN lang=EN-US>And second how do i include an reference into a .patch-File?</SPAN></P>
<P class=EC_MsoNormal><SPAN lang=EN-US> </SPAN></P>
<P class=EC_MsoNormal style="MARGIN-BOTTOM: 12pt"><B><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Arial','sans-serif'">Kai</SPAN></B><SPAN style="COLOR: #1f497d"></SPAN></P>
<P class=EC_MsoNormal> </P></DIV></body>
</html>