Quote:

You could simply use WriteProfileString. See the docs.



Thanks for pointing me in the right direction.

Code:

$sMyIni = @SCRIPTDIR + "\appsrv.ini"
$sOldString="old-citrix.olddomain.com"
$sNewString="new-citrix.newdomain.com"

For Each $sSection in Split(ReadProfileString($sMyIni,"",""),Chr(10))
If $sSection
"Checking section "+$sSection+@CRLF
For Each $sEntry in Split(ReadProfileString($sMyIni,$sSection,""),Chr(10))
If $sEntry
$sValue=ReadProfileString($sMyIni,$sSection,$sEntry)
"Entry "+$sEntry+" has value "+$sValue+" status:"
If $sValue=$sOldString
" **UPDATED**"+@CRLF
$=WriteProfileString($sMyIni,$sSection,$sEntry,$sNewString)
Else
" No change"+@CRLF
EndIf
EndIf
Next
EndIf
Next