How to differentiate between Windows 32 bits and 64 bits?

asked 13 Sep '11, 05:16

Jake's gravatar image

Jake ♦♦
accept rate: 98%

The BitRock InstallBuilder executable and the generated installers are 32 bits applications. When a 32 bits application runs on a 64 bits version of Windows, a number of settings are enabled for backward compatibility reasons, as described in:

It is possible to check whether the installer is being run in a 64 bits of versions by testing to see if the environment variable PROGRAMW6432 exists. For example, you can place the following in the <initializationActionList> section of your project file. It will show a warning if running on win32 or do nothing if running on Windows64:

<showWarning text="Running on Windows 32">
 <compareText text="${env(PROGRAMW6432)}" value="" logic="equals" />

You may also want change the default value in the installdir parameter of your 64bit installer to the 64bit one, you can do it with:

<setInstallerVariable name="installdir" value="${env(PROGRAMW6432)}/My Program Name">
 <compareText text="${env(PROGRAMW6432)}" value="" logic="does_not_equal" />

answered 13 Sep '11, 05:18

Jake's gravatar image

Jake ♦♦
accept rate: 98%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 13 Sep '11, 05:16

Seen: 2,615 times

Last updated: 04 Aug '12, 22:18