On 5 Jun., 16:57, "Pegasus \(MVP\)" <I....@fly.com.oz> wrote:
> You write:
> When I log in as the same local user and execute the batch file
> > everything works.
> > When I run it using the MS Taskplanner Service as a task configured to
> > run as the local user account everything works.
>
> Isn't there a "not" missing somewhere in the second statement?
>
> If so then I suggest you post the batch file you use
My Batch File (anonymonized)
net use
net use F: /delete
net use F: \\server\share password /user:domain\domainuser
dir F:
there is no "NOT" missing.
when running as local logged in user it works
when running via Task-Planner Service as local user it works
when running via srvany (from cruise control) as local user it does
not work
the taskplanner service runs as LocalSystem und starts my batch file
using the security context of the local user
the srvany runs as local user and therefore any sub-process runs as
local user (I already checked that using sysinternals process
explorer)
the output of "net use" is interesting: as local user and via task-
planner it shows the permanent connected drives, running it via
crusiecontrol it says there are no entries in the list

but the "net use F: \\server\share password /user:domain\domainuser"
tells me that the local drive letter is already used (error 85)
it's confusing