|
判断 64/32位 系统&程序 正确导入64/32位DLL 批处理
- rem 判断64/32位系统,四种方法
- ::set "OSbit=32" &wmic os get OSArchitecture|find "64">nul 2>&1 && set "OSbit=64"
- ::set "OSbit=32" ® query "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" /v PROCESSOR_ARCHITECTURE|find "64">nul 2>&1 && set "OSbit=64"
- ::set "OSbit=32" &dir %windir%|find "SysWOW64" >nul 2>&1 && set "OSbit=64"
- set "OSbit=32" &if defined programw6432 set "OSbit=64"
- rem 判断64/32位程序
- set "exebit=32" &echo %processor_architecture% |find "64">nul 2>&1 && set "exebit=64"
- echo %exebit% 位程序运行在 %OSbit% 位操作系统上
- pause
复制代码 |
|