adrian roe
asked on
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.Fi leSystemOb ject")
Set objLocalFile = objFSO.GetFile("c:\temp\te st.txt")
Set objServerFile = objFSO.GetFile("\\fas01.oc a.xxxxxxxx x\install\ test.txt")
objFSO.CopyFile objServerFile.Path, objLocalFile.Path, OverwriteExisting
wscript.quit
thanks for any input, Adrian Roe
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.Fi
Set objLocalFile = objFSO.GetFile("c:\temp\te
Set objServerFile = objFSO.GetFile("\\fas01.oc
objFSO.CopyFile objServerFile.Path, objLocalFile.Path, OverwriteExisting
wscript.quit
thanks for any input, Adrian Roe
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What are the share/ntfs permissions on the source?
ASKER
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....