Detect 64 Bit

Got a problem you cannot solve? Try here.
Post Reply
[email protected]
Posts: 1
Joined: Mon Jan 24, 2011 12:00 pm

Detect 64 Bit

Post by [email protected] »

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?
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Detect 64 Bit

Post 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
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Detect 64 Bit

Post 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~
~~
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP
Post Reply