Re: FileExists with UNC Path with a Service.

From: Tony Proctor (tony_proctor_at_aimtechnology_NoMoreSPAM_.com)
Date: 12/02/04


Date: Thu, 2 Dec 2004 18:47:08 -0000

Is the service running under a specific account, or the default LocalSystem
pseudo-account? I ask because the LocalSystem account doesn't have any
network access. Hence, if your UNC specification is referring to a different
machine then it will fail.

        Tony Proctor

"RL Tech" <tech_support@nospamuls.com> wrote in message
news:uXbQOzJ2EHA.3504@TK2MSFTNGP12.phx.gbl...
> Hi,
> I have an app that is supposed to check a unc path for the existance of a
> file...
> ie: \\computer\\folder\file.xml
>
> When i run the "fileexists" (numerous, on the net), and when run in the
DEV
> as well as compiled, works fine (returns true).
>
> When i try and run the same program as a NT Service, i am told that the
file
> doesn't exist...
>
> This is the Statement in the "FileExists" .
> FileExists = (Dir$(FileName) <> "")
>
> Pretty basic and it always works... except with UNC paths, on a service...
>
> Does anyone have any clue to why this may be happening?
> I did check the permissions, and added my computer (thinking that it was a
> permissions/security issue to the folder, but no change there...)...
>
> Thanks.
>
>



Relevant Pages

  • Re: Map a network drive in win32 service program before user logon.
    ... > We write a win32 service program using c++. ... Becuase LocalSystem account usually doesn't have network credentials. ... Check NTFS permissions on the folder. ...
    (microsoft.public.win32.programmer.networks)
  • Re: runas command on local machine
    ... service running, this is way to much overhead for a simple patch install. ... > I have talked with the vendor till I am blue in the face. ... >> grant additional write permissions to various registry keys. ...
    (microsoft.public.win2000.security)
  • Re: SMS Permissions
    ... I wouldn't mess around with the ntfs permissions, ... account or the localsystem account. ... You will have to do with sms class & instance permissions. ...
    (microsoft.public.sms.setup)
  • Re: Default sqlservice account permission in local machine
    ... Not positive I understand your question, but are you referring to the ... LocalSystem account? ... can be cut and pasted into Query Analyzer is appreciated. ...
    (microsoft.public.sqlserver.security)