Registered: 2005-03-09
Posts: 89
Loc: San Diego, CA
I have Citrix installed on all my workstations and I have a particular application that I am moving to a new server, with a new "Address", so I want to change the address in the .INI file on all the workstations.
I found the ReadFile UDF, and thought I could try that, but I wasn't sure how to work it. I also thought I'd see if anyone else has already to tried to accomplish this?
Quote:
[ 22. October 2003, 11:26: Message edited by: Radimus ]
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
Registered: 2005-03-09
Posts: 89
Loc: San Diego, CA
The section name can vary.
Some are called JDE, some are called JDEdwards, and so on.
I actually grabbed the above code from another thread using the WriteProfileString command. If anyone has a better solution I would appreciate it.
The other thing that I am running into is that, I have found a couple instances where the client is using the FQDN (server.domain.com) where others are just using the server name. So it's skipping one or the other.
Any ideas how to parse multiple variables for the "sOldString" variable?
Registered: 2005-03-09
Posts: 89
Loc: San Diego, CA
Yup... exactly. It screwed up the entire INI file. But NTDOC's code worked exactly as needed. Thanks for all the help guys. I need to get back to coding, I've lost a lot of my logical thought processes.