Re: Computer Startup Batch File via GPO (not working)
- From: Gar <Gar@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 30 Sep 2009 09:03:01 -0700
Hi Twayne,
Thanks for the input, but the example script was just to illustrate the line
of code - was not meant to be syntically correct. But anyways, the batch file
executes fine under the context of a user; so we know it's not the batch
file, but more so the permissions?
Thanks
"Twayne" wrote:
"Gar" <Gar@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message.
news:AD16BC48-AB70-4C1F-92EB-DE0E5C201C70@xxxxxxxxxxxxx
Hi,
I've just wrote a very short and simple batch files which copies some
files onto a set of computers on start up, this batch file is
assigned as a GPO to a Computer OU, via Startup script.
The batch file basically has the following command and I can confirm
that it executes fine under the context of a user.
IF EXIST C:\Folder1 COPY \\DOMAIN_PC1\Folder\File1 C:\Folder1
The GPO is copied to the Domains\SysVol\Domains\Policies\ folder on
the DC The source files to be copied are located under DOMAIN_PC1
Both of the above has been permissioned with full access to both
Authenticated Users and also to Domain Computers, as I believe Start
Up scripts are executed under the context of a computer account.
However, the copy job fails on boot up, and nothing in the event log
indicates what is going wrong. I've left it long enough for full
replication to take place across the DCs.
Any ideas guys?
I -think- you may have a minor flaw but I'm not positive. It fails here
too, on XP SP3+, P4.
Here are my changes:
IF EXIST C:\Folder1 : change to IF EXIST C:\folder1\ . Currently it
seems to be looking for the FILE Folder1, not the directory.
Then I added 2 sets of quotes:
IF EXIST "C:\Folder1\" COPY " \\DOMAIN_PC1\Folder\File1 C:\Folder1"
NOTE: Apologies, but: This is air code from memory: I am no longer at
the machine that used domains so I can't provide a screen shot. And of
course I was only copying one small file I created with copy con &
CTRL-Z.
Also, I don't think the Event Viewer will show you errors from the
Command Prompt, will it? I'd just remove any @ echo OFF you might have,
and watch the screen for errors. Makes the screen a little messy, but
it will put the error code right after the failing command in the batch.
If you still have troubles, I'd check in at alt.msdos.batch.nt
newsgroup and ask about it there. You'll get expert answers there from
professionals either in or formerly in the DOS field. Yes, DOS is quite
alive in many circles. Be sure you're polite; they're a bit picky about
interpersonal skills, but the information is top notch and they're not
afraid to say they don't know although that very seldom happens<g>.
HTH,
Twayne`
- References:
- Prev by Date: Re: Computer Startup Batch File via GPO (not working)
- Next by Date: Re: GPO to Filter Laptops
- Previous by thread: Re: Computer Startup Batch File via GPO (not working)
- Next by thread: GPO to Filter Laptops
- Index(es):
Relevant Pages
|