Re: Xcopy not working in startup script



Slingshotz wrote:
This is driving me nuts and I have not been able to find any answers
on any user group. This is a basic batch file script that I am
deploying through group policy in the startup script to copy
templates
from the server to the local machine. I'm deploying it during the
startup so that every computer gets it, regardless of who logs in.

=========================
if NOT exist "C:\Templates" md "C:\Templates"
pushd "\\servername\Templates\"
xcopy *.dot C:\Templates /Y /D
popd
=========================

It is almost certainly something to do with the running context of the script... startup scripts run as the local SYSTEM account which can make things tricky when network access is concerned.

When you tested the script successfully using a plain copy command, did you also use the PUSHD command before it or did you just use the UNC path in the command?

Cheers,

--
Chris.
.



Relevant Pages

  • Re: Xcopy not working in startup script
    ... This is a basic batch file script that I am ... deploying through group policy in the startup script to copy ... it works fine on it's own, but when deployed through group policy it ... the permissions of the computer object elsewhere in the domain. ...
    (microsoft.public.windows.server.general)
  • Re: Ooooopppps. Rights not right...
    ... Use a log in script to call a compiled file stored on a share. ... > because the classid is for per machine instead of per user. ... > you have create two user classes, one is called student; ... > Put this bat file to the computer startup script in the local group policy. ...
    (microsoft.public.windows.server.general)
  • Re: Power Management GPO?
    ... I suspect that the power management subsystem might not be started when the startup scripts runs or the SYSTEM context can't modify it, but I have some ideas about this and will do some testing later on today to work it out. ... I created a GPO and put the batch file in first as a startup script and when that didn't work I tried it as a logon script. ... A normal user can't change the power settings so a logon script like this won't work either. ... I can't remember if all power setting are per machine, but if some are per machine and some are per user then you could split it up into 2 scripts, one startup script and one logon script. ...
    (microsoft.public.windows.group_policy)
  • Re: Xcopy not working in startup script
    ... This is a basic batch file script that I am ... deploying through group policy in the startup script to copy ... I'm deploying it during the ... the permissions of the computer object elsewhere in the domain. ...
    (microsoft.public.windows.server.general)
  • RE: Set default printer based on room location
    ... done with a "Startup Script" Batch file or with KIX Script. ... if JoeA logs on to a PC in suite A the network printer A is assigned ... > but then if he goes across to suite B network printer b is assigned. ...
    (microsoft.public.windows.server.active_directory)

Loading