Quoted from a reply post on the NetEase community. I haven't tried it myself.
How to assign the version information string obtained by var to a variable
You can extract the variable from prompt; below is a general method:
You can create a batch file in the following form; the contents can be modified as needed.
::getvar.bat
@if == prompt set %2=%3
@if == goto end
@echo off
%comspec% /c %0 invoke %1 %2>tt.bat
call tt
:end
When running it, just add the environment variable name and the corresponding prompt variable value, for example:
getvar curver $v
The advantage of this method is that besides getting the DOS version, it can also get other variables provided by prompt. In addition, its temporary file can be created and deleted at runtime, thus allowing it to run as a standalone program.
How to assign the version information string obtained by var to a variable
You can extract the variable from prompt; below is a general method:
You can create a batch file in the following form; the contents can be modified as needed.
::getvar.bat
@if == prompt set %2=%3
@if == goto end
@echo off
%comspec% /c %0 invoke %1 %2>tt.bat
call tt
:end
When running it, just add the environment variable name and the corresponding prompt variable value, for example:
getvar curver $v
The advantage of this method is that besides getting the DOS version, it can also get other variables provided by prompt. In addition, its temporary file can be created and deleted at runtime, thus allowing it to run as a standalone program.
我的网志
http://hzmys.blog.163.com/
我的网盘
firststep.qjwm.com
fsmys.ys168.com
ssmys.ys168.com
www.brsbox.com/fsmys
www.brsbox.com/ssmys
www.brsbox.com/ccdos
http://hzmys.blog.163.com/
我的网盘
firststep.qjwm.com
fsmys.ys168.com
ssmys.ys168.com
www.brsbox.com/fsmys
www.brsbox.com/ssmys
www.brsbox.com/ccdos

