bat file help

Associate
Joined
27 Feb 2006
Posts
1,750
Location
Normanton
I am wanting to write a .bat file to change a line in a .ini file on about 40 pc's. I have experimented using a little change dos program that I found whilst searching for a solution but its not working due to the syntax of what im wanting to change containing "".

The file on.ini with the line
Logname="" --need changing to---> USER_BY_LOGNAME=Y

This is the bat file I have got so far

c:\temp\change c:\temp\on.ini "Logname=""" "USER_BY_LOGNAME=Y"

Which obviously does not work due to the extra "" It works if I take those out and use
c:\temp\change c:\ONC\Bin\on.ini "Logname=" "USER_BY_LOGNAME=Y"
But I am left with USER_BY_LOGNAME=Y"" in the .ini file which won't work.

Does anyone know a way I can get round this problem or another way I can go about editing that one line.

Cheers:D
 
Back
Top Bottom