Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have an Ini file that contains the following:
[CfgProfile_##InOffice##]
AuthExtension=100
AuthPIN=f4d37e3c8f40d0e3
ServerHost=10.172.0.2
ServerPort=5486
TunnelEnable=0
TunnelDstLocalIP=
TunnelPassword=abc
TunnelPort=5090
I've been trying to make a Batch file to replace the "Server Host=" line with "Server Host=10.172.0.2"And do the same with the "AuthExtension="
I made a script that deletes those specific lines, but i just cant get to understand how you can insert / replace that line.Does anyone here know how to do it? It's bothering the hell out of me.

If you're using Vista this is the wrong forum.
If you're using DOS it ain't gonna be easy.
=====================================
Helping others achieve escape felicityM2

@echo off & setlocal EnableDelayedExpansion
pushd "c:\AB\3CX1\3cx ass\data\"
for /F "delims=" %%j in ('find /v "" ^< "PATH OF YOUR FILE"') do (
set line=%%j
set line=!line:c--t=TUNNEL!
echo.!line!>> "THE NEW FILE TO CREATE"
)
del "PATH OF YOUR FILE"
rename "THE NEW FILE TO CREATE" *.txt
popd
:: End_Of_BatchI have to say it drove me nuts literally.... I was moaning in the office all day. Now i'm having a nice piece of pizza to reward myself.

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |