I called the batch file from power shell
start-process "cmd.exe" "/c $createInDBs
"
I am trying to take input like name of the database from the command prompt using a batch file
Here is my code:
echo off
cd "C:\Program Files"
Choice /N /C ab /M " <?> (A)Create All-in-one database <?> (B)Create Individual database"
If Errorlevel 2 (
set /p sIndiviName=Enter the name of webserver:
echo %sIndiviName% is an Individual Database.
) Else (
set /p sAllName=Enter the name of All-in-one database:
echo %sAllName% is an All-in-one Database.
pause
)
cmd.exe is asking for the name of the database, but in the command, the database is not taken
I got 'is an All-in-one Database' Name of the database is not displayed