Skip to content

Commit

Permalink
try another way
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Crawford <[email protected]>
  • Loading branch information
stephen-crawford committed Sep 25, 2023
1 parent b216245 commit 294aba8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tools/install_demo_configuration.bat
Original file line number Diff line number Diff line change
Expand Up @@ -368,12 +368,16 @@ set default_line=" hash: ""$2a$12$VcCDgh2NDk07JGN0rjGbM.Ad41qVR/YFJcgHp0UGns5JD
set "search=%default_line%"
set "replace=" hash: ""%HASHED_ADMIN_PASSWORD%"""


for /f "delims=" %%i in ('type "%INTERNAL_USERS_FILE%" ^& break ^> "%INTERNAL_USERS_FILE%" ') do (
set "newfile=Output.txt"
(for /f "delims=" %%i in (%INTERNAL_USERS_FILE%) do (
set "line=%%i"
>>"%INTERNAL_USERS_FILE%" echo(!line:%search%=%replace%!
setlocal enabledelayedexpansion
set "line=!line:%search%=%replace%!"
echo(!line!
endlocal
)
))>"%newfile%"
del %INTERNAL_USERS_FILE%
rename %newfile% %INTERNAL_USERS_FILE%

echo AFTER CHANGE:
type "%INTERNAL_USERS_FILE%"
Expand Down

0 comments on commit 294aba8

Please sign in to comment.