@echo off title Auto Install setlocal enabledelayedexpansion echo 讀取密碼 setlocal enabledelayedexpansion for /f "delims=" %%i in ('type "C:\Users\administrator\Desktop\sapwd.txt"') do (set pwd=!pwd!%%i) echo. copy nul d:\wwwroot\NewAdmin\appsettings.production.json for /f "delims=" %%i in ('type "web.config"') do ( set str=%%i set str=!str:%replaced%=%pwd%! echo !str! >>d:\wwwroot\NewAdmin\appsettings.production.json ) pause >nul