Page 1 of 1
Detect 64 Bit
Posted: Mon Jan 24, 2011 2:32 pm
I am installing my application as a 32-bit application, but I need to detect if I am on a 32 or 64 bit machine to install one specific file.
Is there an If Then statement in the scripting to detect this, and to install the proper file?
Re: Detect 64 Bit
Posted: Mon Jan 24, 2011 3:06 pm
by giaviv
Dear Derek,
The Get System Settings command may be used with the "Windows in 64 bit Mode" flag to determine the availability of 64 bit capabilities at runtime, and the "Processor Architecture" flag to determine the exact 64 bit architecture of the underlying processor (Itanium or AMD64/EM64T).
Thanks
Re: Detect 64 Bit
Posted: Mon Jan 24, 2011 3:08 pm
by bokkie
Copy-and-paste the following sample MSIcode. I think it will get you started on your quest.
Code: Select all
~InstallAware Clipboard Data~
~Comment~
~{EFC8FD50-11EF-401C-BD1A-B92B7C889552}~
~~
~End~
~{8AFCC801-D203-47ED-9CC4-B879B2DA778D}~
~MessageBox~
~{DDCEC6BA-1285-41E4-9FB9-50DB52864847}~
~~
~32-bit OS.~
~0~
~1~
~~
~Else~
~{B46ACA2E-20AB-4A62-BB5F-CC58DBA4E4CD}~
~MessageBox~
~{F95A01F4-8B7B-4CB7-9D01-9666AFA89D4F}~
~~
~64-bit OS detected.~
~0~
~1~
~~
~If~
~{31165524-6377-4EB3-9E6B-C9B779CF6F30}~
~OS64BIT~
~0~
~TRUE~
~FALSE~
~Get System Settings~
~{89EBAFF7-B057-4052-9243-481D0D18D34A}~
~OS64BIT~
~65~
~Set Variable~
~{299792AF-8E23-439E-8679-C68AC7A4DCF9}~
~OS64BIT$MYAH$MYAH$FALSE~
~~