|
昨天写了个批处理,根据不同的系统跳转到不同位置进行不同处理:
ver | find "5.0" > NUL && goto win2000
ver | find "5.1" > NUL && echo %PROCESSOR_ARCHITECTURE% | find "86" && goto winxp86
ver | find "5.1" > NUL && echo %PROCESSOR_ARCHITECTURE% | find "64" && goto winxp64
ver | find "5.2" > NUL && goto win2003
ver | find "6.0" > NUL && goto winvista
ver | find "6.1.7600" > NUL && echo %PROCESSOR_ARCHITECTURE% | find "86" && goto win786
ver | find "6.1.7600" > NUL && echo %PROCESSOR_ARCHITECTURE% | find "64" && goto win764
ver | find "6.1.7601" > NUL && echo %PROCESSOR_ARCHITECTURE% | find "86" && goto win786sp1
ver | find "6.1.7601" > NUL && echo %PROCESSOR_ARCHITECTURE% | find "64" && goto win764sp1
ver | find "6.2" > NUL && goto win8
写好后直接放到windows 7 x64系统下运行,成功判断系统类型为64未然后跳转到win764段进行操作;
但我用innosetup或者7z把这个批处理和一些文件一起打包,包安装结束时批处理自动运行,这时候若是在win764bit下部署批处理系统判断就出错了,竟然判断为win7 32,即运行到了goto win786这句上,有哪位大大晓得咋回事儿哦?
[ 本帖最后由 2011virtualink 于 2012-6-28 18:28 编辑 ] |
|