Answers.Body: <p>In Windows' <code>cmd</code>, commands are joined by two ampersands like you specified (<code>cd foo &amp;&amp; dir</code>), however in PowerShell (which Microsoft is pushing to replace <code>cmd</code>), commands are joined by semicolons: <code>cd foo; dir</code>.</p>
  
  <p>Also, it looks like you have an orphan closing parentheses <code>)</code> in your code. Is that supposed to be there?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-16T17:46:34.553Z
Answers.Text: Orphaned parentheses werejust mistake during pasting code here, just fixed. About powershell - i also tried to run script on it and i replaced `&&` with `;` but it didnt helped.
Answers.UserDisplayName: Piotr Pogorzelski
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-16T11:46:21.053Z
Answers.LastActivityDate: 2019-10-16T11:46:21.053Z
Answers.UserDisplayName: Sandwich
Body: <p>I try to create a simple deployment batch script that would work on windows.</p>
  
  <p>To do that, I need to interact with Craft console app. How do I pass multiple commands to it to perform installation?</p>
  
  <p>I tried this:</p>
  
  <pre><code>(echo mysql &amp;&amp; echo localhost)|craft setup
  </code></pre>
  
  <p>This in theory should answer two first questions that craft console asks during installation. Unfortunetly it just caused console program to be stuck in some kind of loop when first question about the database is repeated infinitely.</p>
  
Tags: <console>
Title: Craft console app within windows batch script
ThreadText: # Craft console app within windows batch script
  
  (Asked by: username_0 on 2019-10-16)
  
  I try to create a simple deployment batch script that would work on windows.
  
  To do that, I need to interact with Craft console app. How do I pass multiple commands to it to perform installation?
  
  I tried this:
  
  ```
  (echo mysql && echo localhost)|craft setup
  
  ```
  
  This in theory should answer two first questions that craft console asks during installation. Unfortunetly it just caused console program to be stuck in some kind of loop when first question about the database is repeated infinitely.
  
  **Tags:** console
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-10-16. Score: 1
  
  In Windows' `cmd`, commands are joined by two ampersands like you specified (`cd foo && dir`), however in PowerShell (which Microsoft is pushing to replace `cmd`), commands are joined by semicolons: `cd foo; dir`.
  
  Also, it looks like you have an orphan closing parentheses `)` in your code. Is that supposed to be there?
  
  > **Comments:**
  > **username_0**: Orphaned parentheses werejust mistake during pasting code here, just fixed. About powershell - i also tried to run script on it and i replaced `&&` with `;` but it didnt helped.  
  
  ---
  
  