Problems using GP to run batch file to be run when User Logson to workstation.

ServerX - windows server 2016, DNS server, dhcp server, group policy server
ServerZ - windows server 2016, IIS server, WSUS, HyperV, contains folder with specific data.

Using ServerX, Group Policy, setting up logon for workstations to use a batch file in \\ServerZ\updatews.bat

updatews.bat contains:
xcopy \\ServerZ\specialfiles$\*.* C:\myfiles

However, nothing happens.

I have checked the share on \\ServerZ\specialfiles$ is in place and has everyone as permission to read.
I have checked there are files to copy from \\ServerZ\specialfiles$
The folder C:\myfiles does exist on the workstation

The workstation are running Win7 Pro 32bit.

Any help appreciated.
LVL 1
AIGSNetwork AdministratorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shaun VermaakTechnical SpecialistCommented:
And this command runs fine manually?
xcopy \\ServerZ\specialfiles$\*.* C:\myfiles

Open in new window

0
8046586Commented:
as the top line in your batch file you should add:

if not exist "C:\myfiles\" mkdir C:\myfiles
0
McKnifeCommented:
"Using ServerX, Group Policy, setting up logon for workstations to use a batch" - make sure that this GPO and with it the script has applied. Use

gpresult /h %temp%\results.html & %temp%\results.html
to retrieve and look at the settings.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Shaun VermaakTechnical SpecialistCommented:
Using ServerX, Group Policy, setting up logon for workstations to use a batch file in \\ServerZ\updatews.bat
Is it startup or logon script? With logon script users will probably not have access to C:\myfiles
0
McKnifeCommented:
Why shouldn't they? Folders created on c: will by default be writable to anyone - no matter who creates them.
0
Shaun VermaakTechnical SpecialistCommented:
You do not know that for sure, it could have been changed from defaulr
I am still waiting for answer to #a42424542
0
AIGSNetwork AdministratorAuthor Commented:
I have tested it manually - works ok.
All permission appear to be ok.
The folder concerned does exist.
In the end i removed the Logon scripts completely from GP and found a setting in GP that allows you to copy files as part of the GP, it works fie, no issues.
Thanks for you help and guidance.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2016

From novice to tech pro — start learning today.