Results 1 to 5 of 5

Thread: Windows Service

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2001
    Location
    nr Manchester, England
    Posts
    34

    Windows Service

    I'm running a service which I have set up to start sub processes.

    Is this possible with a service that logs into the system itself (so runs when the system appears logged off) ?

    I ask this because the sub process don't appear to be active when the service is running.

    Any help is much appreciated.

  2. #2
    Addicted Member
    Join Date
    Aug 1999
    Posts
    164
    Yes. It is possible. (I think I understand what you are doing).

    Are you accessing any data over shared drives? (if so you need to use UNCs)

    Are you accessing any data that has file permissions? (if so your service "run as" needs to have an account with permissions also).
    -Shurijo

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2001
    Location
    nr Manchester, England
    Posts
    34
    Thanks for the quick reply.

    The service 'logs on' using a profile set-up on the local network domain. Therefore I believe any processes the service kicks off would inherit the profile, and so would have access to the local network.

    The sub process basically sets up file watchers to watch folders over the network.

    Anyhow I'm not sure what UNCs are ? So I don't know.

    Any help is much appreciated.


  4. #4
    Addicted Member
    Join Date
    Aug 1999
    Posts
    164
    Rob,

    Your service will inherit that user/profile's permissions, but not mapped drives and other profile specific things.

    A UNC is like \\computername\sharename\foldername\file.txt
    a mapped drive equivalant is like M:\foldername\file.txt

    Since the service doesn't see any mapped drives (non-local drives), you need to use UNC paths (specifing the computer name and share name). Try that out and let me know if it works or not.

    You can test UNCs by typing them in your Windows File/Internet Explorer or "Start->Run" and it will work just like using mapped drive paths.
    -Shurijo

  5. #5

    Thread Starter
    Member
    Join Date
    Aug 2001
    Location
    nr Manchester, England
    Posts
    34
    Thanks again for the reply.

    I am using UNCs to access the network.

    When I run the sub-process manually it works fine, and is able to access any area of the network that the current profile has access to (without using mapped drives).

    It's only when I set the service up to kick off the sub-process that nothing seems to happen - and I don't know why. I can only assume that the sub-process isn't picking up the service profile, or the service isn't running the sub-process because the system isn't logged in (the service logs in itself).

    I'm going to add some more logging to try and help me solve the riddle !!!


Posting Permissions

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



Click Here to Expand Forum to Full Width