I was given the challenge today to create a group policy that would copy a single file from a server share to c:\documents and settings\username\applicat
I experimented with a login script that used a batch file that contained a UNC to the file on the server, but discovered that it balked at using the UNC (not all of the users have the same drive mapping to the share on the server so I can't use a mapped drive letter).
I tried creating an msi file with WinINSTALL LE - that was overkill...
So I decided to try my hand at writing a script. I've scoured EE & other sources for scripts but have not had much success in modifying them for my need. At the most I have created a script that will copy all the files from the source folder but it does not get to the correct destination. The files wind up in a subfolder of the directory from which I'm running the script.
I've attached the most successful script I have...
Set oShell=CreateObject( "WScript.Shell" )
If objFSO.FileExists("C:\Documents and Settings\%UserName%\Application Data\subfoldername\") = False Then
objFSO.CopyFolder "\\server\share1\share2", "path"
objFSO.CopyFile "\\server\share1\share2\*.ini", "path"