Re: help w/ services please
From: Andrew (abaylis_nos_at_spamcop.net)
Date: 12/15/03
- Next message: Maarten Wiltink: "Re: Newbie Question re: Text Files"
- Previous message: Dr John Stockton: "Re: Newbie Question re: Text Files"
- In reply to: Alan S. Olson: "Re: help w/ services please"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 15 Dec 2003 20:18:31 +1100
Rather than using a mapped drive / path combo to specify the file, use the
format \\server\path and it should work fine.
HTH
Andrew
"Alan S. Olson" <aolson@wi.rr.com> wrote in message
news:VqoCb.123871$Vu6.65614@twister.rdc-kc.rr.com...
> The reason for that error is that the file i'm trying to copy is on a
> network share. The localSystem obviously does not have access to any
> network shares. This si the problem. The services does nto interact w/
the
> desktop at all. This is an issue with LocalSystem not being 'network
aware'
> and not finding that path.
>
> Yes, i double/triple/quadruple checked the path. If i use the exact code
in
> a standalone program it works fine. This is network-related.
>
> Alan
>
> "Maarten Wiltink" <maarten@kittensandcats.net> wrote in message
> news:3fd9ed69$0$207$e4fe514c@news.xs4all.nl...
> > "Alan S. Olson" <aolson@wi.rr.com> wrote in message
> > news:4d9Cb.121288$Vu6.104569@twister.rdc-kc.rr.com...
> >
> > > I have a service written that, among other things, needs to copy files
> > > across a network drive and/or share. The problem when i do this is
> > > that CopyFile() failes, and GetLastError returns 3, which i believe is
> > > FileNotFound.
> >
> > "The system cannot find the path specified", according to net helpmsg.
> > Did you check the _exact_ path specified?
> >
> >
> > > I suspect this is due to security and/or rights. I changed the user
> > > which this service logs in as, and even set it to Administrator. It
> > > stills fails with GetLastError=3.
> >
> > There is rarely any need to run services under named accounts for
> > other than policy reasons. I think LocalSystem has _more_ rights than
> > Administrator.
> >
> > Does this service interact with the desktop by any chance?
> >
> > Groetjes,
> > Maarten Wiltink
> >
> >
>
>
- Next message: Maarten Wiltink: "Re: Newbie Question re: Text Files"
- Previous message: Dr John Stockton: "Re: Newbie Question re: Text Files"
- In reply to: Alan S. Olson: "Re: help w/ services please"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|