Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Can i call a config file from batch file and username/password from prompt  (Read 2992 times)

0 Members and 1 Guest are viewing this topic.

sumiRoot

    Topic Starter


    Starter

    • Experience: Beginner
    • OS: Windows 7
    Hi Kudos,

    I have an issue with my deployment file(batch file) which is already automated but there are some steps in that. Which i would like to get it automated.

    I have my server details in a environment.properties file which i normally call it from my BATCH file. Problem is that, there are server details with username and password and every time i need to comment out other servers in order to deploy the file in any of 1 server and same for username/password too.

    I am thinking to create 1 config file which will contain all the server details with their port excluding username/password. I will make a prompt for username/password for security purpose.

    Example:
    Below is my environment.properties file which i call it from my automated batch tool for picking server details with their password.

    #Env1.
    #servername=facebook.com

    #Env2.
    #servername=gmail.com

    portnumber=1111
    sslenabled=false

    fipsenabled=false
    #input and output is a part of deployment step which i just for copy and pasting files
    input=in.xml
    output=out.xml
    #the below is the one would like to ask for prompt
    username=admin
    password=admin

    So the above file can contain more than 2 server details and same for password. so i need to un-comment the server in order to deploy the file in the respective server. Can i create environment.config file, i heard that is more friendlier than this.

    I know, its a bit lengthy but if someone have an idea of doing this will be much appreciated. I will upload if i may able to create config file.

    Thanks Kudos !!