Running exe as service in windows server 2008
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Running exe as service in windows server 2008

  1. #1
    Join Date
    Jun 2009
    Posts
    2

    Running exe as service in windows server 2008

    I want to run my exe as service in windows server 2008. I created my exe by using vc++ 2008. From vista, windows have isolated session 0 from user session. I want my service to be interactive. I am able to run my exe as service in XP but it is not working Server 2008.

    Please give me your valuable suggestion.

  2. #2
    Join Date
    Feb 2009
    Location
    India
    Posts
    444

    Re: Running exe as service in windows server 2008

    You can use CreateProcessAsUser to run an exe from within a service.
    _Superman_
    I love work. It gives me something to do between weekends.

    Microsoft MVP (Visual C++)

  3. #3
    Join Date
    Jun 2009
    Posts
    2

    Re: Running exe as service in windows server 2008

    Thanks for the reply...

    I tried CreateProcessAsUser but still it is not invoking my exe.

    I tried several other options like obtaining token by using WTSQueryUserToken for sessin obtained with WTSGetActiveConsoleSessionId and using this token with CreateProcessAsUser but still I am help less.

    I am ready to buy software available in market which can invoke my exe as service on windows server 2008. If you people know any such software then pls recommend it.

  4. #4
    Join Date
    Jun 2009
    Posts
    4

    Re: Running exe as service in windows server 2008

    what is the kind of service you want to create?
    their are lot of difference between service and an EXE.
    you want to run the service as terminal service?

  5. #5
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,023

    Re: Running exe as service in windows server 2008

    Quote Originally Posted by dondany007 View Post
    I want to run my exe as service in windows server 2008. I created my exe by using vc++ 2008. From vista, windows have isolated session 0 from user session. I want my service to be interactive. I am able to run my exe as service in XP but it is not working Server 2008.
    Since the very beginning of Windows NT family services themselves were recommended to be non-interacive. All further development of the concept (like session 0 isolation) only strengthened the approach: the interactive service application now must be split to secured executive part (service) and unsecured user-session UI ("face"), that communicate to each other by means of some IPC (pipes, mailslots, signals, shared memory, sockets, etc.) or a combination of them.

    Inevitable consequence: an interactive service application must be (re)designed appropriately.

    Please give me your valuable suggestion.
    Not sure about the value, but the suggestion is to obey the rules.
    Best regards,
    Igor

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center