windows - Multiple line batch file -


I am new to the batch, so I was playing with the command and I came to know that to write command lines in batch I do not give examples for for example.

  Start cmd.exe / k "ipconfig & amp; andami & amp;; amm; getmac & amp; netplwiz"% windir% \ system32 \ wuapp.exe  

This would work fine, but I was thinking how to make it easier to read and with comments, and I can not understand how to do it. Here's what I tried to do

  start cmd.exe ^ / k "ipconfig ^ & amp; amp; & amp; amp; amp; & amp; amp; amp; & amp;;; and & quot; & amp; amp; amp; getmac ^ & amp; Netplwiz ".windir% \ system32 \ wooup.exe  

So this does not work me know the symbols ^ line is the continuation of it showcasing in cmd but workup for ipconfig The commands are ignored for doing so.

Here is an example with many rows and it works fine

  set wind =% windir% sets works winsys =% windir% \ system32 rm checks whether A browser is currently running. If so, they will be terminated start / minute / wait wscript.exe% ~ dp0CheckforProcesses.vbs Removal of RAM Java JRE 6 update 29 Start / wait msiexec.exe / X {26A24AE4-039D-4CA4-87B4-2F83216029FF} Java / JRE 7 Update 55 Start / Wait msiexec.exe / X {26A24AE4-039D-4CA4-87B4-2F83217055FF} / Quantity Removed RIM Java JRE 7 Update 65 Start / wait msiexec.exe / X { 26A24AE4-039D-4CA4-87B4-2F03217065FF} / Setting the Silent REM Java JRE 7 Update 65 msiexec / i "% ~ dp0JRE \ 765 \ jre7_65.msi" / norestart / qn  

Me I hope that clarifies my question and if not I'm sorry. I know that in my instances this command is not useful in that competition, but it does not matter that I want to use multiple rows to improve the batch file code and not 300 characters in a row (I hope That makes sense). Only one explanation has been given to me in my head that some commands are to be written in one line and there is no other way around it. Thanks for your time

& amp; . Symbol

For example:

:

  close @echo ipconfig Whoami getmac netplwiz echo \ echo press space bar to close this window for . Stop & gt; Tap:  

Edit: I believe a line break can also work. Edit 2: Added examples.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -