不晓得你“获取所在目录路径”何用,请说清楚- @echo off
- ::判断系统
- ver|find "6.1." >nul&&set "v=win7"
- ver|find "6.2." >nul&&set "v=win8"
- ::判断32位or64位
- if exist "%systemroot%\syswow64" (set "w=x64") else (set "w=x32")
- ::进行相应操作
- goto %v%%w% 2>nul||echo 未定义的系统&ping -n 2 0 >nul&exit
-
- :win7x32
- >>"%v%%w%.reg" echo;Windows Registry Editor Version 5.00
- .......
- goto end
- :win7x64
- >>"%v%%w%.reg" echo;Windows Registry Editor Version 5.00
- .......
- goto end
- :win8x32
- >>"%v%%w%.reg" echo;Windows Registry Editor Version 5.00
- .......
- goto end
- :win8x64
- >>"%v%%w%.reg" echo;Windows Registry Editor Version 5.00
- .......
- goto end
-
- :end
- ::导入
- regedit /s "%v%%w%.reg"
- ::删除
- del "%v%%w%.reg"
- ::退出
- ping -n 2 0 >nul&exit
复制代码
|