Plex 2E

Expand all | Collapse all

Deploying a PLEX .NET Executable as a Service

Jump to Best Answer
  • 1.  Deploying a PLEX .NET Executable as a Service

    Posted 06-22-2015 03:46 PM

    has any one had success of running a Plex .NET Executable as a Service in windows

     

    I need to have a process that will sit an wait fo things to happen - the current process uses the clocktick panel event but then requires a panel AND the interaction with the desktop -

     

    i would like to build the plex Exe (or the PlexRuntimeLauncher.Exe as  a service that will allow me to wait but not require desktop interaction...

     

    Any ideas?



  • 2.  Re: Deploying a PLEX .NET Executable as a Service

    Posted 06-22-2015 03:56 PM

    I usually use Sleep for this. Have a look at StellaTools.Abstract.OBJECTS.Msc.Sleep._Sub

     

    System.Threading.Thread.Sleep(1000) for .net



  • 3.  Re: Deploying a PLEX .NET Executable as a Service

    Posted 06-23-2015 07:29 PM

    I have the 'Sleep part working fine - but What i want to do is install the EXE as a service s that it runs as a system account - (like the plex runtime app does)

     

    the reason for this is that our servers are all configured to logoff 'user accounts' after 15 minutes therefore we cannot have  aprocess running as a connected user as the app is then terminated.. if i can define a service then the app wil run throughout the day performing tasks as needed

     

    I  have tried using the installutil for .NET but i get the error  below -

     

    No public installers with the RunInstallerAttribute.Yes attribute could be found in the {gen&buildfolder}\TESTSERVICE.App.exe assembly.

     

     

    I am guessing the the PLEX project created does not have the Service installers defined as described below as i am guessing it only supports VS 2010

     

    https://msdn.microsoft.com/en-us/library/ddhy0byf(v=vs.110).aspx

     

    When i try and open the plex .CS files - theer is not the references for each sub project -

     

    this sounds like a good case for the plug in process to generate the code library as a Service (like the WCF process)



  • 4.  Re: Deploying a PLEX .NET Executable as a Service
    Best Answer

    Posted 06-24-2015 10:14 AM

    Wayne -

     

    have you tried sc.exe ?

     

    How to create a Windows service by using Sc.exe

     

    Otherwise create a Service Project in VS and call your function via Plex.obrun.dll.

     

    Best regards

    Lorenz



  • 5.  Re: Deploying a PLEX .NET Executable as a Service

    Posted 06-24-2015 10:19 AM

    I tried to get the PLEX generated .EXE installed but couldn't get it to work - so I ended Up as you say  - creating a Service project and using obrun to call the function -  - I am testing it as i write this .

     

    It would be great if the Code Library Wizard could build that service 'Wrapper' project  - like the WCF Service project  does.. -



  • 6.  Re: Deploying a PLEX .NET Executable as a Service

    Posted 06-24-2015 10:45 AM

    Nothing is stopping you writing your own Code Library Wizard Plug

     

    Read: How to - Create a Plex Code Library Deployment Wizard Plugin in Plex r6.1.doc

     

    I thinking of using it to generate PCML, INT COUNT support, publishing to IWs etc for Consume & Publish Webservices from IBMi - Solved



  • 7.  Re: Deploying a PLEX .NET Executable as a Service

    Posted 06-24-2015 10:50 AM

    I will add it to my 'to do' list