Hi Guys,

I'm trying to write a script to copy files to a group of servers. I apologize if there already is a UDF for this, but the proxy server here at work apparently renders the UDF list as blank. \:\(

I have a group of Windows 2008 R2 servers. I have placed the files in c:\temp. I also have two ini files in the same location. One has a list of all the computers in the local group and the other has a list of the files to be copied.

Examples:
computers.ini
 Code:
[computers]
comp1=server-name1
comp2=server-name2
comp3=another-server


files.ini
 Code:
[Files]
file1=jdk-6u35-windows-i586.exe
file2=visioviewer.exe


I'm trying to use:
 Code:
Break On
Dim $SO
$SO = SetOption('Explicit',          'On')
$SO = SetOption('NoMacrosInStrings', 'On')
Dim $strWks, $strFile, $colFiletoSend
Dim $strComps, $colComps, $objComp, $objFSO
Dim $intErr, $objFile, $strFileName, $strRemotePath
$strFile  = "c:\temp\files.ini"
$strComps = "c:\temp\computers.ini"
$colComps = Split(ReadProfileString($strComps,"computers",""),chr(10))
For each $objComp in $colComps
   If $objComp <> ""
      $strWks = ReadProfileString(strComps,"computers",$objComp)
      $colFiletoSend = Split(ReadProfileString($strFile,"Files",""),chr(10))
      cd "c:\temp"
      $strRemotePath = "\\" + $strWks + "\c$\temp"
      $objFSO = CreateObject("Scripting.FileSystemObject)
      For each $objFile in $colFiletoSend
         If $objFile <> ""
            $strFileName = ReadProfileString($strFile,"Files",$objFile)
            $intErr = $objFSO.CopyFile($strFileName,$strRemotePath)
         EndIF
      Next
   EndIf
Next


When attempting the copy, I'm getting:
 Code:
COM exception error "CopyFile" <<null> - <null>> [-2147352567/80020009]


If I just do from a command prompt in c:\temp:
 Code:
copy jdk-6u35-windows-i586.exe \\server-name1\c$\temp
it works. Any ideas what I am doing wrong, or a better approach?

Thanks