I know there are a lot of related questions on SO, like this one or this one, but for some reason I couldn't get any of those working so far.
I am trying to create a batch file to install several pieces of software in a row :
Here is my batch file
set packages=(7zip.install, ^ :: for compression
notepadplusplus.install, ^ :: file editor
Firefox, ^
putty, ^
mysql -Version 5.5.30, ^
postgresql)
for %%i in %packages% do (
::echo %%i
cinst %%i
)
Everything works fine but for the mysql part. The space is actually taken as a delimiter, which means that I get
E:\>(echo 7zip.install )
7zip.install
E:\>(echo notepadplusplus.install )
notepadplusplus.install
E:\>(echo Firefox )
Firefox
E:\>(echo putty )
putty
E:\>(echo mysql )
mysql
E:\>(echo -Version )
-Version
E:\>(echo 5.5.30 )
5.5.30
E:\>(echo postgresql )
postgresql
What I would like to end up with is
E:\>(echo mysql -Version 5.5.30 )
mysql -Version 5.5.30
The trick is that I want to keep my list on top of the script with one element per line, and have the possibility to insert a comment to be clear about what happens.
Is there any way to do this?
I am way more used to linux bash, and I must say I am a bit lost with the windows notations.
Thanks!