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. How to Run executable by a windows service

How to Run executable by a windows service

Scheduled Pinned Locked Moved C#
helptutorialquestion
9 Posts 4 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.
  • R Offline
    R Offline
    Reddy Prakash
    wrote on last edited by
    #1

    Hi Can any one tell me how to run a exectuable by windows service? I tried through process.start(), but no use. I am using Admin user to run this service. I am struck up with this... Thanks for the help in advance.

    G V realJSOPR 3 Replies Last reply
    0
    • R Reddy Prakash

      Hi Can any one tell me how to run a exectuable by windows service? I tried through process.start(), but no use. I am using Admin user to run this service. I am struck up with this... Thanks for the help in advance.

      G Offline
      G Offline
      Giorgi Dalakishvili
      wrote on last edited by
      #2

      Services run on their own desktop so if you start a program from service it will start on that desktop and not at the desktop you are looking at :)

      Giorgi Dalakishvili #region signature my articles My blog[^] #endregion

      R realJSOPR 2 Replies Last reply
      0
      • G Giorgi Dalakishvili

        Services run on their own desktop so if you start a program from service it will start on that desktop and not at the desktop you are looking at :)

        Giorgi Dalakishvili #region signature my articles My blog[^] #endregion

        R Offline
        R Offline
        Reddy Prakash
        wrote on last edited by
        #3

        Hi I am not sure whether i have posted the requirement correctly. Any how i will try to make it clear. 1. I am having a EXE in the application folder. 2. I have a windows service through which i want to run the exe available in the application folder. Am i clear now..........

        G 1 Reply Last reply
        0
        • R Reddy Prakash

          Hi I am not sure whether i have posted the requirement correctly. Any how i will try to make it clear. 1. I am having a EXE in the application folder. 2. I have a windows service through which i want to run the exe available in the application folder. Am i clear now..........

          G Offline
          G Offline
          Giorgi Dalakishvili
          wrote on last edited by
          #4

          Yes, it is clear. Same reply applies here. When starting an executable from service it runs on another desktop.

          Giorgi Dalakishvili #region signature my articles My blog[^] #endregion

          1 Reply Last reply
          0
          • R Reddy Prakash

            Hi Can any one tell me how to run a exectuable by windows service? I tried through process.start(), but no use. I am using Admin user to run this service. I am struck up with this... Thanks for the help in advance.

            V Offline
            V Offline
            Vikram A Punathambekar
            wrote on last edited by
            #5

            Try setting the service's Allow service to interact with desktop option to true in the services applet. Be warned that this is very bad practice.

            Cheers, Vıkram.


            "if abusing me makes you a credible then i better give u the chance which didnt get in real" - Adnan Siddiqi.

            G 1 Reply Last reply
            0
            • V Vikram A Punathambekar

              Try setting the service's Allow service to interact with desktop option to true in the services applet. Be warned that this is very bad practice.

              Cheers, Vıkram.


              "if abusing me makes you a credible then i better give u the chance which didnt get in real" - Adnan Siddiqi.

              G Offline
              G Offline
              Giorgi Dalakishvili
              wrote on last edited by
              #6

              Vikram A Punathambekar wrote:

              Be warned that this is very bad practice.

              And it is no more supported in Vista: Impact of Session 0 Isolation on Services and Drivers in Windows Vista[^]

              Giorgi Dalakishvili #region signature my articles My blog[^] #endregion

              V 1 Reply Last reply
              0
              • G Giorgi Dalakishvili

                Services run on their own desktop so if you start a program from service it will start on that desktop and not at the desktop you are looking at :)

                Giorgi Dalakishvili #region signature my articles My blog[^] #endregion

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

                Ummmm, no. If he sets up his Process object correctly, he can run an external application.

                "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." - Jason Jystad, 10/26/2001

                1 Reply Last reply
                0
                • R Reddy Prakash

                  Hi Can any one tell me how to run a exectuable by windows service? I tried through process.start(), but no use. I am using Admin user to run this service. I am struck up with this... Thanks for the help in advance.

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

                  You have to provide a lot more info before we have any hope of assisting you. 1) Can you run the application manually? 2) How are you setting up your Process object?

                  "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." - Jason Jystad, 10/26/2001

                  1 Reply Last reply
                  0
                  • G Giorgi Dalakishvili

                    Vikram A Punathambekar wrote:

                    Be warned that this is very bad practice.

                    And it is no more supported in Vista: Impact of Session 0 Isolation on Services and Drivers in Windows Vista[^]

                    Giorgi Dalakishvili #region signature my articles My blog[^] #endregion

                    V Offline
                    V Offline
                    Vikram A Punathambekar
                    wrote on last edited by
                    #9

                    Thanks, my Georgian friend, I didn't know that. :) Can't figure out the lynch votes though. :confused:

                    Cheers, Vıkram.


                    "if abusing me makes you a credible then i better give u the chance which didnt get in real" - Adnan Siddiqi.

                    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