Does anybody know how to create a batch file that can shell one program if its a 64-bit system or shell another if its a 32-bit system?
相关问题
- How to get the return code of a shell script in lu
- Invoking Mirth Connect CLI with Powershell script
- xcopy include folder
- Batch file if string starts by
- Jenkins - cmd is not recognized
相关文章
- 使用2台跳板机的情况下如何使用scp传文件
- In IntelliJ IDEA, how can I create a key binding t
- shell中反引号 `` 赋值变量问题
- How get the time in milliseconds in FreeBSD?
- Why windows 64 still makes use of user32.dll etc?
- Launch interactive SSH bash session from PHP
- Generate disk usage graphs/charts with CLI only to
- Extracting columns from text file using Perl one-l
Check for
%PROCESSOR_ARCHITECTURE%
beingx86
:At least for the time being. On a server I have access to it's
AMD64
but no clue how Itanium looks like, for example. But 32-bit versions always reportx86
.Another option, that also works on WoW64:
On Linux, you can simply use "arch" at the command line.
On OSX (Snow Leopard), it returns "i386", even if you're on 64-bit hardware.
And easy way would be to test for the existence of the
%SystemRoot%\SysWOW64
folder. While it's not 100% foolproof, it's a really good for detecting if the system is 64-bit.This Line Will give you what you want, Works on XP, Vista and 7
save it as .bat or .cmd
If the Installation Source in the local Machine just point to it (D:\Programs\Softwarex64.exe)
and if you want to just run commands and not to install, just type the command you want for x64 Between the first () and the commands for x86 Between the second ()
Copy this into your CMD to test it
I hope this helps
All batch up there not work in my Windows 8 x64.
Following work with me :
read this.
http://blogs.msdn.com/b/david.wang/archive/2006/03/26/howto-detect-process-bitness.aspx