I want to be able to copy files to all the PCs in our network/2003 domain.
My approach is hardly revolutionary:
1.Create .bat file to (among other things) test for existence of screensaver.scr in and copy it across if absent
2.Test the .bat works
3.Create Computer Startup Script GPO to run the .bat file
But the copy doesn't work in that context...
I added an output redirect to the line to see what happened:
Which gives me:
That at least proves the variables are working.
If I then run the script manually, i.e. using the admin account logged on the windows on the same PC (actually PCs), the screensaver gets copied, which proves the paths the variables refer to exist.
Incidentally, there's another part of the script which copies sleep.exe to system32 and that also fails when run as a Startup script but not when run manually.
Why the H won't files copy to the system32 folder when running under the SYSTEM account at startup time? Other file copies in the script work from the same central location, albeit to the All-Users Desktop, rather than windows\system32.
The PCs are Windows XP SP3.
I'm finding this really puzzling and frustrating. We're having a black building test this weekend so I was aiming to take advantage of all the PCs being off to get the new screensaver deployed when they all get switched back on.
Wish we had Server 2008 DCs so I could use GPO Preferences instead...
I have tried uninstalling anti-virus on one of the PCs but that's not made a difference.
JJ
[small][purple]Variables won't. Constants aren't[/purple]
There is no apostrophe in the plural of PC (or PST, or CPU, or HDD, or FDD, or photo, or breakfast...and so on)[/small]
My approach is hardly revolutionary:
1.Create .bat file to (among other things) test for existence of screensaver.scr in and copy it across if absent
2.Test the .bat works
3.Create Computer Startup Script GPO to run the .bat file
But the copy doesn't work in that context...
I added an output redirect to the line to see what happened:
Code:
echo copy %Screensaver% c:\windows\system32>>%SystemDrive%\config.txt
copy %Screensaver% c:\windows\system32 >>%SystemDrive%\config.txt
Which gives me:
Code:
copy \\srv01\softdist$\Screensaver\Screensaver.scr c:\windows\system32
0 file(s) copied.
That at least proves the variables are working.
If I then run the script manually, i.e. using the admin account logged on the windows on the same PC (actually PCs), the screensaver gets copied, which proves the paths the variables refer to exist.
Incidentally, there's another part of the script which copies sleep.exe to system32 and that also fails when run as a Startup script but not when run manually.
Why the H won't files copy to the system32 folder when running under the SYSTEM account at startup time? Other file copies in the script work from the same central location, albeit to the All-Users Desktop, rather than windows\system32.
The PCs are Windows XP SP3.
I'm finding this really puzzling and frustrating. We're having a black building test this weekend so I was aiming to take advantage of all the PCs being off to get the new screensaver deployed when they all get switched back on.
Wish we had Server 2008 DCs so I could use GPO Preferences instead...
I have tried uninstalling anti-virus on one of the PCs but that's not made a difference.
JJ
[small][purple]Variables won't. Constants aren't[/purple]
There is no apostrophe in the plural of PC (or PST, or CPU, or HDD, or FDD, or photo, or breakfast...and so on)[/small]