Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [DATABASE]
- DBName = exampleframe
- //DBName =.SQLEXPRESS@exampleFRAME // used by MSSQL
- DBUser = exampleuser
- DBPassword = examplepw
- FOR /F "delims=:" %%a in (%TaskMonitorConfigFile%) DO (
- set string=%%a
- echo %string%|find "[DATABASE]" >nul
- if errorlevel 1 (echo notfound) else (echo found)
- if "!string:~0,6!"=="DBName" set DBName=!string:~9!
- if "!string:~0,6!"=="DBUser" set DBUser=!string:~9!
- if "!string:~0,10!"=="DBPassword" set DBPassword=!string:~13!
- break
- )
Add Comment
Please, Sign In to add comment