|
If you're using on error resume next, then I usually put
something like the following if statement after every major
step:
if err.number <> 0 then
Wscript.echo err.description
end iff From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of DL.ActiveDirectory Sent: Wednesday, August 18, 2004 8:25 AM To: [EMAIL PROTECTED] Subject: RE: [ActiveDir] GPO to copy a file to all machines The script is running, as I have it also distributing a GPC.DAT file from a virus server (I am changing parent servers on Symantec). The files in that subroutine distribute ok.
I am at a loss as to why it is not distributing the scr. I have the error submerge commented out. I will throw in some echo’s for feedback into the script and see if I can locate the problem.
Any other ideas or specific scripting I can use to trap errors?
Thank
you,
-----Original
Message-----
When I tested this a while back, the scripts extension will impersonate the machine account to get access to network resources--so the machine account (or authenticated users will work) will need at least read access to the Netlogon share (which they should have, btw). Can you verify that the script is even running during startup? You might want to put some logging into that script at specific stages just to see where its failing and what the message might be. Also, you've got "On error, resume next" at the beginning but you don't trap for any errors that may be occurring. Putting this statement in the beginning without trapping for anything has the effect of having the script ignore any errors that might otherwise popup, so I'd either remove that statement or add some error handling.
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of
DL.ActiveDirectory I am using this to distribute a screensaver also (machine startup vbs script).
I am having a problem however. I think I know what it is, but I am not sure how to fix it.
I have the screensaver sitting in the NETLOGON folder of my DC, and I am trying to copy from that location to the users’ “%systemroot%\System32\”, but it doesn’t copy the file.
If I run the script manually (note, I am member of Domain Admin group) the file copies over, but it doesn’t copy during startup. Does the SYSTEM user have read rights to the NETLOGON folder? If not, and I place the file in the policy’s folder along with the .vbs (which is already there I should note), is there an environment variable that referrs to this location or an easy way to specify this location for the file copy? For instance, If I do not specify a location, does the script first check the directory it is located?
Here is the subroutine in my vbs:
'============================================================================= ' CheckScrSaver '============================================================================= public sub CheckScrSaver()
' On Error Resume Next
Dim strFile, strSrc, strDst strFile = "NBHSecuritySCR.scr" strSrc = strDC & "\NETLOGON\" & strFile strDst = strSysRoot & "\System32\"
If fso.FileExists (strDst & strFile) then 'Proceed else fso.CopyFile strSrc, strDst, true end if
end sub
Thank
you,
-----Original
Message-----
MSI has the advantage of a) not running on every boot b) fixing anything that gets deleted, corrupted, etc. I'd spend the extra 5 minutes and make the MSI, personally.
--Brian
|
- RE: [ActiveDir] GPO to copy a file to all machines Craig Gauss
- RE: [ActiveDir] GPO to copy a file to all machines Darren Mar-Elia
- RE: [ActiveDir] GPO to copy a file to all machines Craig Gauss
- RE: [ActiveDir] GPO to copy a file to all machines Depp, Dennis M.
- RE: [ActiveDir] GPO to copy a file to all machines Robert Rutherford
- RE: [ActiveDir] GPO to copy a file to all machines Brian Desmond
- RE: [ActiveDir] GPO to copy a file to all machines DL.ActiveDirectory
- RE: [ActiveDir] GPO to copy a file to all machines Darren Mar-Elia
- RE: [ActiveDir] GPO to copy a file to all machines DL.ActiveDirectory
- Re: [ActiveDir] GPO to copy a file to all machines Brent Westmoreland
- RE: [ActiveDir] GPO to copy a file to all machines Darren Mar-Elia
- RE: [ActiveDir] GPO to copy a file to all machines DL.ActiveDirectory
