title: Multiple line batch file
body: <p>I am new to batch. So I was playing with commands and I found that I dont undarstand how to write multiple lines of commands in batch here is example.</p>
  
  <pre><code>start cmd.exe /k "ipconfig &amp;&amp; whoami &amp;&amp; getmac  &amp;&amp; netplwiz " 
  
  %windir%\system32\wuapp.exe  
  </code></pre>
  
  <p>This will work fine but I was thinking how to make it easier for reading and make it with comments and I cant figure out how to do it. Here is what I tried.</p>
  
  <pre><code>start cmd.exe ^
  /k "ipconfig ^
  &amp;&amp; whoami ^ 
  &amp;&amp; getmac ^ 
  &amp;&amp; netplwiz "
  
  %windir%\system32\wuapp.exe 
  </code></pre>
  
  <p>So this does not work I know this symbol ^ is continuation of line. It does work for ipconfig to showup in cmd but rest commands are ignored.</p>
  
  <p>Here is example with multiple lines and it works fine</p>
  
  <pre><code>set wind=%windir%
  set winsys=%windir%\system32
  
  REM Checks if any browsers are currently running. If so, they will be terminated.
  start /min /wait wscript.exe %~dp0CheckforProcesses.vbs
  
  REM Uninstalling Java JRE 6 Update 29
  start /wait msiexec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216029FF} /quiet
  
  REM Uninstalling Java JRE 7 Update 55
  start /wait msiexec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217055FF} /quiet
  
  REM Uninstalling Java JRE 7 Update 65
  start /wait msiexec.exe /X{26A24AE4-039D-4CA4-87B4-2F03217065FF} /quiet
  
  REM Installing Java JRE 7 Update 65
  msiexec /i "%~dp0JRE\765\jre7_65.msi" /norestart /qn
  </code></pre>
  
  <p>I hope my question is clear and I am sorry if not. I know this commands in my example not useful in that contest , but this is not the point. The point I want to use multiple lines for better reading batch file code and not have 300 characters in one line (I hope it makes sense).
  In my head I have only one explanation that some commands is have to be written in one line and there is no other way around.
  Thank you for your time</p>