|
Answer» Hi, I am running a dxl file from my batch file as follows
CD C:\Program Files\Telelogic\DOORS 7.1\bin doors -batch D:\programs\searchstringcmdline.dxl -user "vishi" -password "123"
What I want is CD C:\Program Files\Telelogic\DOORS 7.1\bin doors -batch D:\programs\searchstringcmdline.dxl -user %1" -password %2
so that I can enter the username and password of my choice Can my batch file contain username and password which later on GET substituted at both the PLACES.%1 and %2 are command line arguments and must be SENT to the program on the command line when the program is RUN. You can create (set) variables and then use them in your code.
Code: [Select]CD C:\Program Files\Telelogic\DOORS 7.1\bin set user=username set pswd=password doors -batch D:\programs\searchstringcmdline.dxl -user %user%" -password %pswd%
This creates a security breach so be careful.
Another way to do this would be to prompt for the information:
Code: [Select]CD C:\Program Files\Telelogic\DOORS 7.1\bin set /p user=Enter Username: set /p pswd=Enter Password: doors -batch D:\programs\searchstringcmdline.dxl -user %user%" -password %pswd%
Good luck. Thanx, it worked
|