You can do for example :
cmd /c "set a=ipconfig && cmd /c ^"echo %a%^" | cmd"
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
if i use the command : cmd /c “set x=c@alc & echo %x:@=% | cmd”
it is ok, it will start the calc
but if i use the commmand : cmd /c "set a=ipconfig"
and i try to run : %a%
it is failed, i found it is not to set the a
how can i set a=ipconfig by use cmd /c
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more
You can do for example :
cmd /c "set a=ipconfig && cmd /c ^"echo %a%^" | cmd"