GPO Startup Batch File Stopped working

For a windows 2008 R2 / Citrix 6.5 farm, a windows batch file set in the computer / windows settings / start up GPO, is used to copy an image file to the c:\windows folder.  For three weeks the script work just fine. Now the batch file does not run.  The goal is to copy a file to the c:\windows folder before the first user can log onto the citrix server.

GPresult shows the GPO is successfully applied with out error.  
Event Viewer GPO logs are without error.

This was the original script - again it worked for 3 weeks.
set ImagePath=C:\scripts\Desktop_Branding\Images
If /i "%COMPUTERNAME%" EQU "SERVER01" copy %ImagePath%\01.bmp c:\windows\DesktopLogo.bmp /y 
If /i "%COMPUTERNAME%" EQU "SERVER02" copy %ImagePath%\02.bmp c:\windows\DesktopLogo.bmp /y 
If /i "%COMPUTERNAME%" EQU "SERVER03" copy %ImagePath%\03.bmp c:\windows\DesktopLogo.bmp /y 
If /i "%COMPUTERNAME%" EQU "SERVER04" copy %ImagePath%\04.bmp c:\windows\DesktopLogo.bmp /y 
If /i "%COMPUTERNAME%" EQU "SERVER05" copy %ImagePath%\05.bmp c:\windows\DesktopLogo.bmp /y 

Open in new window


Added redirected Logging to see if logs were generated.  No logs are created.
set ImagePath=C:\scripts\Desktop_Branding\Images
If /i "%COMPUTERNAME%" EQU "SERVER01" copy %ImagePath%\01.bmp c:\windows\DesktopLogo.bmp /y >> D:\branding.log
If /i "%COMPUTERNAME%" EQU "SERVER02" copy %ImagePath%\02.bmp c:\windows\DesktopLogo.bmp /y >> D:\branding.log
If /i "%COMPUTERNAME%" EQU "SERVER03" copy %ImagePath%\03.bmp c:\windows\DesktopLogo.bmp /y >> D:\branding.log
If /i "%COMPUTERNAME%" EQU "SERVER04" copy %ImagePath%\04.bmp c:\windows\DesktopLogo.bmp /y >> D:\branding.log
If /i "%COMPUTERNAME%" EQU "SERVER05" copy %ImagePath%\05.bmp c:\windows\DesktopLogo.bmp /y >> D:\branding.log

Open in new window


Then modified the COMPUTERNAME variable
set ImagePath=C:\scripts\Desktop_Branding\Images
If /i %%COMPUTERNAME%% EQU "SERVER01" copy %ImagePath%\01.bmp c:\windows\DesktopLogo.bmp /y >> D:\branding.log
If /i %%COMPUTERNAME%% EQU "SERVER02" copy %ImagePath%\02.bmp c:\windows\DesktopLogo.bmp /y >> D:\branding.log
If /i %%COMPUTERNAME%% EQU "SERVER03" copy %ImagePath%\03.bmp c:\windows\DesktopLogo.bmp /y >> D:\branding.log
If /i %%COMPUTERNAME%% EQU "SERVER04" copy %ImagePath%\04.bmp c:\windows\DesktopLogo.bmp /y >> D:\branding.log
If /i %%COMPUTERNAME%% EQU "SERVER05" copy %ImagePath%\05.bmp c:\windows\DesktopLogo.bmp /y >> D:\branding.log

Open in new window


No changes were made to the GPO before or after when the batch file stop running..  
No window or citrix updates were applied before or when the batch file stop running.
Both Domain Controller SYSVOLs were checked to ensure batch file was there. - it is.

I am open to better ways to copy a file to the c:\windows folder.  The copy must be done prior to the first user logging on to the Citrix server.  The file copy is used to brand the desktop so a citrix user can ID the server.  It helps during help desk calls.
epmmisAsked:
Who is Participating?
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.

SandeshdubeySenior Server EngineerCommented:
Apply a GPO with the setting Always wait for the network at computer startup and logon to the computer. This setting is located under Computer Configuration\Administrative Templates\System\Logon

Also add this GPO:http://mywinsysadm.wordpress.com/2011/07/22/windows-7-the-assignment-of-application-from-policy-failed-the-error-was/

and check.
0
barrykflCommented:
what error message come out , did u check location folder?
0
Tony JLead Technical ArchitectCommented:
Well - notwithstanding we need to try and work out why the GPO has suddenly stopped working, I would suggest a much neater way is to use a Group Policy Preference. These often-overlooked additions to group policies are incredibly powerful and versatile and can handle things such as file copy, registry update and much more, far more dynamically than scripts.

There is a great technet blog here: http://blogs.technet.com/b/grouppolicy/archive/2009/11/02/group-policy-preferences-colorful-and-mysteriously-powerful-just-like-windows-7.aspx

Now as for why the policy stopped working - can you run a gpresult on one of the servers? Don't use RSOP.MSC as (a) it's deprecated and (b) it doesn't capture all settings.

You can target the machine and then the user in question.

Also, there's a nice technet article here that explains enabling policy logging: http://social.technet.microsoft.com/wiki/contents/articles/4506.group-policy-debug-log-settings.aspx

If you can take a look at these and post back.

Oh one final thought - You might want to consider the Advanced Group Policy Manager from MS. This has an audit trail as GPO's have to be checked out and back in so you can see not only what has changed historically, but who changed it.
0
piattndCommented:
Any startup script that requires network connectivity needs to also have a policy defined to tell the computer to wait until network connectivity is present to apply GPOs:

http://technet.microsoft.com/en-us/magazine/gg486839.aspx

I would start there.  If that doesn't fix it, I'd suggest the logging methods suggested above.
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
epmmisAuthor Commented:
Delaying the startup for 120 seconds resolved this issue.
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
Citrix

From novice to tech pro — start learning today.