viewpoint-particle

Author Topic: Compiler 2013B - various questions  (Read 3258 times)

etippelt

  • Newbie
  • *
  • Posts: 42
Compiler 2013B - various questions
« on: July 26, 2013, 08:22:03 am »
I have used some example code to get a 64 bit service running on Windows 7 to which I can send instructions via an INI file. I have now been reading up on Pipes and I have some general questions that are not entirely clear from the documentation.
1. What is the reason for using the .exs file extension for services instead of .exe ?  I've not spotted any specific answers to that and I'm curious.....
2. My service would be running in Session 0 on a Win 7 system. I would like to implement communication with a user in a different session via pipes, but it's not clear whether the pipe communication works between different sessions or is limited to a single session?
3. The pipe examples are useful but I'm a little unclear on whether I could set up a pipe server from within a service and have it always open for transactions from a client process. Basically I want to be able to send instructions from a user to the server, defining a target path and an executable for the service to run, and then return an exit code back to the user. Ideally I would also want to be able to send back status updates to the user during the process running from the service.

I'm quite happy to experiment but for this particular idea, I have a two day window next week to show proof of concept, so any help would be most welcome.

Cheers
EdT (using winbatch since 1995)
Using Winbatch since 1995. Excellent tool, awesome support always.

td

  • Tech Support
  • *****
  • Posts: 3463
    • WinBatch
Re: Compiler 2013B - various questions
« Reply #1 on: July 26, 2013, 01:30:47 pm »
I have used some example code to get a 64 bit service running on Windows 7 to which I can send instructions via an INI file. I have now been reading up on Pipes and I have some general questions that are not entirely clear from the documentation.
1. What is the reason for using the .exs file extension for services instead of .exe ?  I've not spotted any specific answers to that and I'm curious.....

There are many reasons, not the least of which is that it tells the compiled script to interact with the OS as a service.

Quote
2. My service would be running in Session 0 on a Win 7 system. I would like to implement communication with a user in a different session via pipes, but it's not clear whether the pipe communication works between different sessions or is limited to a single session?
3. The pipe examples are useful but I'm a little unclear on whether I could set up a pipe server from within a service and have it always open for transactions from a client process. Basically I want to be able to send instructions from a user to the server, defining a target path and an executable for the service to run, and then return an exit code back to the user. Ideally I would also want to be able to send back status updates to the user during the process running from the service.

I'm quite happy to experiment but for this particular idea, I have a two day window next week to show proof of concept, so any help would be most welcome.

Since named pipes can be used across computers it would seem reasonable to assume that they can be used across sessions.  Named pipes are, however, securable objects and the WinBatch named pipe implementation does not provide a lot of reconfigurability with regard to pipe server security.  Your success may depend on both system security policies and the account that the pipe server service is running under.   The dotNet FCL has support for named pipes that may provide more permissions flexibility. However, I have not tried this using WinBatch CLR hosting so I cannot attest to the ease or likelihood of success of such an endeavor.
 
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade