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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Problem accessing network printers from Services

Problem accessing network printers from Services

Scheduled Pinned Locked Moved C / C++ / MFC
helpsysadminquestion
5 Posts 2 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.
  • S Offline
    S Offline
    Sivakumar R
    wrote on last edited by
    #1

    Hi All, I have an application that tries to print a PDF File to a network printer from the WebBrowser control. I am able to print the report if I just run the exe directly. But when I tried to start the application from a service as a new process then it could not find the network printers. Is there any secruity permissions to be applied when starting a new process from the service? Or what could be of the cause and its possible solutions? Kindly help me.. I am just struggling a lot in this!! Thanks, Sivakumar R

    K 1 Reply Last reply
    0
    • S Sivakumar R

      Hi All, I have an application that tries to print a PDF File to a network printer from the WebBrowser control. I am able to print the report if I just run the exe directly. But when I tried to start the application from a service as a new process then it could not find the network printers. Is there any secruity permissions to be applied when starting a new process from the service? Or what could be of the cause and its possible solutions? Kindly help me.. I am just struggling a lot in this!! Thanks, Sivakumar R

      K Offline
      K Offline
      kakan
      wrote on last edited by
      #2

      Your service runs under the local account, which means that it won't be able to use network resources. Start the service under a given user account instead. And use a user account that has the rights to do network printing.

      Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

      S 1 Reply Last reply
      0
      • K kakan

        Your service runs under the local account, which means that it won't be able to use network resources. Start the service under a given user account instead. And use a user account that has the rights to do network printing.

        Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

        S Offline
        S Offline
        Sivakumar R
        wrote on last edited by
        #3

        Hi, You are right. The service is currently running as a local system account. But I have one more limitation here. My application is a Desktop Application, I am starting this through a Service to grant/deny some rights to my application. So the service needs to be on a Local System Account to enable this option. I tried configure the service to work with the network user. But unfortunatly, my application is not displaying the GUI. I gone through the following article : http://www.codeproject.com/install/...vicedesktop.asp to try to enable the service to interact with the service. But it does not seems to be working. Here is what I was trying to do.. - I tried to login as a network user - I change the Logon properties of the service to work with a specified account. Is it possible to make the service to interact with the desktop even if we set it not as a local system account? Thanks a lot for your suggestions!! Regards, Sivakumar R

        K 1 Reply Last reply
        0
        • S Sivakumar R

          Hi, You are right. The service is currently running as a local system account. But I have one more limitation here. My application is a Desktop Application, I am starting this through a Service to grant/deny some rights to my application. So the service needs to be on a Local System Account to enable this option. I tried configure the service to work with the network user. But unfortunatly, my application is not displaying the GUI. I gone through the following article : http://www.codeproject.com/install/...vicedesktop.asp to try to enable the service to interact with the service. But it does not seems to be working. Here is what I was trying to do.. - I tried to login as a network user - I change the Logon properties of the service to work with a specified account. Is it possible to make the service to interact with the desktop even if we set it not as a local system account? Thanks a lot for your suggestions!! Regards, Sivakumar R

          K Offline
          K Offline
          kakan
          wrote on last edited by
          #4

          Sivakumar R wrote:

          Is it possible to make the service to interact with the desktop even if we set it not as a local system account?

          Hello. I had exactly the same problem a while ago but I couldn't find a solution, so gave up :-O In the end, I autostarted the app instead of running it as a service. And configured auto-login for the user. Not the best solution, but it worked (kind of)... Anyway, the program is started when windows i started, which was the main demand.

          Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

          S 1 Reply Last reply
          0
          • K kakan

            Sivakumar R wrote:

            Is it possible to make the service to interact with the desktop even if we set it not as a local system account?

            Hello. I had exactly the same problem a while ago but I couldn't find a solution, so gave up :-O In the end, I autostarted the app instead of running it as a service. And configured auto-login for the user. Not the best solution, but it worked (kind of)... Anyway, the program is started when windows i started, which was the main demand.

            Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

            S Offline
            S Offline
            Sivakumar R
            wrote on last edited by
            #5

            Hi, Thanks for the reply. I had to make my application to toggle between the OS and Application. When the user login as an administrator in my app and shutdown, it should restart into the OS. When they restart from the OS, then it should go to the applicaiton mode. So I had to go for the service to decide whether to start the application of just go to the OS. Everything works well and running except that I could not access the network printer. It works well with the local printer. I am just trying to get if we set any security attributes before starting the service / my process, is there anyway I can access the network printer. I sincerely thanks for your valuable suggestions!! Regards, Sivakumar R

            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