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
Sent: Wednesday, August 18, 2004 7:08 AM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] GPO to copy a file to all machines

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,
Mitchell D. Lawrence
Director, Network Administrator
IT&S Department
North Bay Hospital
1711 W. Wheeler Ave
Aransas Pass, TX 78336
ph: (361) 758-0580
fx: (361) 758-0581
pg: (361) 270-0421
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(home)
**< Good | Cheap | Fast > (Pick Two)**

-----Original Message-----
From: Brian Desmond [mailto:[EMAIL PROTECTED] On Behalf Of Brian Desmond
Sent:
Tuesday, August 17, 2004 9:19 PM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] GPO to copy a file to all machines

 

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

-----Original Message-----
From: joe [mailto:[EMAIL PROTECTED]
Sent: Tue 8/17/2004
10:15 AM
To: [EMAIL PROTECTED]
Cc:
Subject: RE: [ActiveDir] GPO to copy a file to all machines

I don't have an example but I would recommend doing this in the computer startup scripts. Just have the script pull the file from wherever. At this point you are running as localsystem of the machine so you will have the perms to put it anywhere on the box you like and will be done before the user logs on.

 

Computer Configuration | Windows Settings | Scripts (Startup/Shutdown)

 

Copy the files to the GPO's startup folder (click on Show Files on the interface to open an explorer window to the location) and specify the script/batch file you want to run. You could add the screen saver file to that folder as well.

 

I guess you could do an install package as well but that might be overkill.

 

  joe

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig Gauss
Sent:
Tuesday, August 17, 2004 10:53 AM
To: [EMAIL PROTECTED]
Subject: [ActiveDir] GPO to copy a file to all machines

Does anyone have an example of using a GPO to copy a file to all machines?  I have a screen saver I am supposed to distribute across the organization and really dont want to do it manually.

 

Thanks.

Reply via email to