Script works locally - fails as a login script - need help please

Hey everybody,

I usually have good luck with my login sripts, but I am having trouble with this one.  As part of an upcoming software upgrade, I'm going to have to replace an existing config/inf file with a "new' one.  No problem right?  So I get some nifty code and start testing it out.  Works fine if I run the .VBS file locally on a computer - doesn't work when I add the vbs file to a domain controller as part of a logon script.  Here's the code - anybody got any suggestions as to why I'm having problems with this?

Const  OverwriteExisting = TRUE
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objLocalFile = objFSO.GetFile("c:\temp\test.txt")
Set objServerFile = objFSO.GetFile("\\fas01.oca.xxxxxxxxx\install\test.txt")

objFSO.CopyFile objServerFile.Path, objLocalFile.Path, OverwriteExisting


thanks for any input,  Adrian Roe
adrian roeMicroComputer Specialist IIAsked:
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.

Mal OsborneAlpha GeekCommented:
Does this require admin rights?  Login scripts run under the security context of the user; if they don't have enough rights it will fail.

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
Nadav SolomonCommented:
What are the share/ntfs permissions on the source?
adrian roeMicroComputer Specialist IIAuthor Commented:
thanks Malmensa and Nadav for chiming in.  I did some more investigating and found what I assume was the issue.  I had originally configured the GPO on one of my domain controllers - "DC1".  Reviewing the events in the Group Policy sub- folder in the Event Viewer of a couple of clients, I noticed that authentication was occurring on another domain controller ("DC2" ).  So I connected to the Group Policy Management console on DC2 and when I tried to edit the GPO that I had created for my script, I got an error message saying that "Access was denied" to this GPO.  At this point, I deleted the GPO from both Domain Controllers, Rebooted both machines - and recreated the GPO on DC2 and the login script w/in it started executing.  Pissed that I had to reboot a server, but perhaps because one was 2008 Server and the other 2003 Server had something to do with it.  Who Knows....
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
VB Script

From novice to tech pro — start learning today.