is there a way to make a batch script display the variable name instea in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.) Posted July 31, 2014 Hello, i am making a batch script that will install another batch script. It looks like this:@echo offecho @echo off > example.batecho echo Hi >> example.batecho echo 1.) Option1 >> example.batecho echo 2.) Option2 >> example.batecho echo 3.) Option3 >> example.batecho if %selection%==1 goto opt1 >> example.batecho if %selection%==2 goto opt2 >> example.batecho if %selection%==3 goto opt3 >> example.batSo it displays all this text and saves what is displayed to example.bat. But it will display variables as their values; instead of making this:if %selection%==1 goto opt1it will do this:if ==1 goto opt1because theese variables have no value. So, is there a way to tell this script to display variable names instead of values?p.s.also, a pause message is "Press any key to continue..." . Can i change that? 0
is there a way to make a batch script display the variable name instea
in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Posted
Hello, i am making a batch script that will install another batch script. It looks like this:
@echo off
echo @echo off > example.bat
echo echo Hi >> example.bat
echo echo 1.) Option1 >> example.bat
echo echo 2.) Option2 >> example.bat
echo echo 3.) Option3 >> example.bat
echo if %selection%==1 goto opt1 >> example.bat
echo if %selection%==2 goto opt2 >> example.bat
echo if %selection%==3 goto opt3 >> example.bat
So it displays all this text and saves what is displayed to example.bat. But it will display variables as their values; instead of making this:
if %selection%==1 goto opt1
it will do this:
if ==1 goto opt1
because theese variables have no value. So, is there a way to tell this script to display variable names instead of values?
p.s.
also, a pause message is "Press any key to continue..." . Can i change that?