我用了下列的脚本实现不了。麻烦大伙看看,我想实现机名等于computer01的话就跳转到01执行脚本后退出,否则按默认执行脚本后退出。
set computername>temp.txt
set file=temp.txt
set /p str=<%file%
if %str:~13%=="computer01" then goto 01
echo false >1.txt
exit
:01
echo true >1.txt
exit
[ Last edited by stjie on 2007-11-14 at 02:30 PM ]
set computername>temp.txt
set file=temp.txt
set /p str=<%file%
if %str:~13%=="computer01" then goto 01
echo false >1.txt
exit
:01
echo true >1.txt
exit
[ Last edited by stjie on 2007-11-14 at 02:30 PM ]
