Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Windows service

Windows service

Scheduled Pinned Locked Moved C#
question
9 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Heinzzy
    wrote on last edited by
    #1

    How can I make my service to start certain application, so user'll be able to use it?

    N realJSOPR P H 4 Replies Last reply
    0
    • H Heinzzy

      How can I make my service to start certain application, so user'll be able to use it?

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      Process.Start can start applications. But a service starting applications doesn't looks good. Services are not meant for this.

      Best wishes, Navaneeth

      H 1 Reply Last reply
      0
      • N N a v a n e e t h

        Process.Start can start applications. But a service starting applications doesn't looks good. Services are not meant for this.

        Best wishes, Navaneeth

        H Offline
        H Offline
        Heinzzy
        wrote on last edited by
        #3

        unfortunately if I use Process.Start applications run without any interface :(

        C 1 Reply Last reply
        0
        • H Heinzzy

          unfortunately if I use Process.Start applications run without any interface :(

          C Offline
          C Offline
          Calla
          wrote on last edited by
          #4

          If I'm not mistaken, and I could be, you have to check the "Allow service to interact with desktop" option under the "Log On" tab of the service properties.

          H 1 Reply Last reply
          0
          • C Calla

            If I'm not mistaken, and I could be, you have to check the "Allow service to interact with desktop" option under the "Log On" tab of the service properties.

            H Offline
            H Offline
            Heinzzy
            wrote on last edited by
            #5

            Sure, but I'd like to start applications on the users desktop :((

            D 1 Reply Last reply
            0
            • H Heinzzy

              How can I make my service to start certain application, so user'll be able to use it?

              realJSOPR Offline
              realJSOPR Offline
              realJSOP
              wrote on last edited by
              #6

              A windows service should not be used to start applications for users. However, if yu really want to do this, the service should wait for a user to log in, and then launch the app. You'll have to turn on "Interacts with desktop" in the service.

              .45 ACP - because shooting twice is just silly
              -----
              "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
              -----
              "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

              1 Reply Last reply
              0
              • H Heinzzy

                How can I make my service to start certain application, so user'll be able to use it?

                P Offline
                P Offline
                PIEBALDconsult
                wrote on last edited by
                #7

                That is not a good idea -- rethink the problem.

                1 Reply Last reply
                0
                • H Heinzzy

                  Sure, but I'd like to start applications on the users desktop :((

                  D Offline
                  D Offline
                  Dave Kreskowiak
                  wrote on last edited by
                  #8

                  Services run under a non-visible desktop. What you want to do shouldn't be done at all. The "Allow the service to interact with Desktop..." option is for the service to put up a small user interface, like notifications or options dialogs. It is NOT going to allow the service to launch an application on the users Desktop. Any process launched by the service will inherit the session and desktop of the process that launched it, i.e.: your service. There's just about never a good reason to do this and I suspect you're approaching your design all wrong. For instance, what happens when your service needs to launch the UI app and there's noone logged in?

                  A guide to posting questions on CodeProject[^]
                  Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                       2006, 2007, 2008
                  But no longer in 2009...

                  1 Reply Last reply
                  0
                  • H Heinzzy

                    How can I make my service to start certain application, so user'll be able to use it?

                    H Offline
                    H Offline
                    Heinzzy
                    wrote on last edited by
                    #9

                    Thank you all! I realize that it was bad idea and switch to autorun application without UI.

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups