You could write to a single file with @ComputerName as the Key Name using a timer (if the file fails to write because its been written to by another computer) for example:
While 1
If IniWrite($Server & "\ComPorts.ini" , @ComputerName, "OriginalComPort" , $OriginalIniRead) = 0 Then
Sleep(Random(5000, 15000)) ;~ Wait between 5 and 10 seconds before trying again.
Else
ExitLoop
EndIf
Wend
Or you could write to csv file using similar method for example:
Local $sFileName = "\\Server\ComPort.csv"
While 1
If FileWrite($sFileName, @ComputerName & "," & "Original Comport" & "," & IniRead ($OriginalIni, "Scanner","ComPort","Null") & @CRLF) = 0 Then
Sleep(Random(5000, 15000)) ;~ Sleep 5 - 15 Seconds and try again
Else
ExitLoop
EndIf
Wend
Alternatively you could write to individual .ini files like you have posted and then use a separate script to write that data into csv format for example:
#include <File.au3>
Local $hFileList = FileOpen(@ScriptDir & "\" & @Year & "-" & @Mon & "=" & @MDay & "_Comport.csv", 2)
Local $aFileList = "\\Server", "*.ini", 1, 0, 1, 0)
If @Error Then Exit MsgBox(32, "Error", "Unable to find any ini files.")
Local $sOriginalComPort = ""
For $i = 1 To $aFileList[0]
FileWrite($hFileList, StringReplace($aFileList[0], ".ini", "") & "," & IniRead ("\\Server\" & $aFileList[$i], "OriginalComPort" , "Value", "Null") & @CRLF)
Next
Please note none of the code above has been tested, but hopefully should give you some ideas.