MaxL script credentials from Text file and run as batch
Hello,
I have a MaxL script to connect to the database using the follwoing command.
login $1 $2 on $3;
logout;
I am passing parameters in the .bat file by calling text file which contains values as below.
FOR /F "tokens=1-3 delims=|" %%A IN (F:\Folder\Params.txt) DO (
SET username=%%A
SET password=%%B
SET servername=%%C
)
F:\Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseClient\bin\Startmaxl.cmd F:\BudgetProcess\Calcs\Scripts\JobCode.mxl %username% %password% %servername% > F:\BudgetProcess\Logs\JobCode.log
Text file contains values as below
username|password|servername
This is working fine without any issue but I don't want to use the password in clear text and interested in encryption mode to protect it. I was able to encrypt the maxl file to maxls and get ridge of the Params.txt file but the problem is I have many maxl files which I need to modify manually. Is there a way I can place the encrypted key in the text file and use the same mechanism instead of changing all the files?