I am a new user who comes here out of admiration. I have encountered several problems and would like to ask for advice. I am used to writing common task modules with batch processing in the use of Windows (although it is not a real DOS in XP).
1. May I ask how to reference the system environment variables in the.bat file, that is, the values obtained by the set command. I have tried using for /F %%f in ('set'
do... but it seems not easy to obtain the values of specific variables, and can only use for /F %%f in ('set'
do echo %%f to enumerate all. Suppose I now only want to reference the value of the %windir% variable, I don't know how to write it.
2. May I ask how to do four arithmetic operations in batch processing? For example, if I echo 1+3, the output is "1+3". If I want to get the sum of 1 plus 3, which is 4, how should I do it?
3. May I ask how to set the local IP and gateway, etc. in the command line? Thank you! Salute!
1. May I ask how to reference the system environment variables in the.bat file, that is, the values obtained by the set command. I have tried using for /F %%f in ('set'
do... but it seems not easy to obtain the values of specific variables, and can only use for /F %%f in ('set'
do echo %%f to enumerate all. Suppose I now only want to reference the value of the %windir% variable, I don't know how to write it.2. May I ask how to do four arithmetic operations in batch processing? For example, if I echo 1+3, the output is "1+3". If I want to get the sum of 1 plus 3, which is 4, how should I do it?
3. May I ask how to set the local IP and gateway, etc. in the command line? Thank you! Salute!
I'm a progamer who work with windos
not a programmer with windows
not a programmer with windows

