This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- custom code to get windows arch
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 28, 2011
12:27 PM
fail to check system architecture
Hi everyone,
I use the custom rule "Check System Architecture" to check my installer is running on x86 or x86_x64, but it doesn't work to filter the x86 system.Does anybody has ideas?
I use the custom rule "Check System Architecture" to check my installer is running on x86 or x86_x64, but it doesn't work to filter the x86 system.Does anybody has ideas?
(7) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 01, 2011
02:40 AM
Hi,
There are already some other posts regarding this, search for "Check System Architecture" in the forum.
e.g. http://community.flexerasoftware.com/showthread.php?t=191068
--Jerome
There are already some other posts regarding this, search for "Check System Architecture" in the forum.
e.g. http://community.flexerasoftware.com/showthread.php?t=191068
--Jerome
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 01, 2011
03:14 AM
I think that in this case you simply miss the rule for Intel 32-bit.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 02, 2011
11:06 AM
Hi,
What I want is not show the feature on the x86 system,but it still show it even I remove the Intel32 platform and only check to perform on x86_64 and other x64 platfroms.
What I want is not show the feature on the x86 system,but it still show it even I remove the Intel32 platform and only check to perform on x86_64 and other x64 platfroms.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 02, 2011
12:35 PM
zhiyangchen wrote:
Hi,
What I want is not show the feature on the x86 system,but it still show it even I remove the Intel32 platform and only check to perform on x86_64 and other x64 platfroms.
I'm afraid I didn't understand you: on what platform you want your installer to work and on what platform you don't want it to work?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 02, 2011
11:21 PM
pv7721 wrote:
I'm afraid I didn't understand you: on what platform you want your installer to work and on what platform you don't want it to work?
Hi,
Sorry about unclear information. As you can see from the picture, I only choose x64 platfrom to perform this action, but when I run my installer on x86 platform, it will aslo perform this action. So the "Check System Architecture" doesn't work actually.
I try to wrote a custom code to get os.arch from java but it will show the value in JRE not exactly the system information.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 03, 2011
09:40 AM
pv7721 wrote:
I'm afraid I didn't understand you: on what platform you want your installer to work and on what platform you don't want it to work?
I want omy installer work on x64 platform but not work on x86 platform.
As you can see from the picture, I only choose x64 platfrom to perform this action, but when I run my installer on x86 platform, it will aslo perform this action.
I try to wrote a custom code like get System.getProperty("os.arch") to get os.arch from java but it doesn't show the information of hardware or processor but the JVM information.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 03, 2011
02:23 PM
I have a custom rule, is64BitArch, that uses the following snippet to decide the bit mode:
static int getWindowsBits() {
String arch = System.getenv("PROCESSOR_ARCHITECTURE");
String arch2 = System.getenv("PROCESSOR_ARCHITEW6432");
if (arch == null)
return 32;
if (arch2 != null) arch = arch2;
if (arch.compareToIgnoreCase("x86") == 0)
return 32;
else
return 64;
}
This handles the case where you're running inside a program that's in the 32 bit WOW emulator but really it's on 64, which is why we check two vars.
On unix it uses completely different code, to exec a command, "getconf LONG_BIT" for linux and "isainfo -b" for solaris.
static int getWindowsBits() {
String arch = System.getenv("PROCESSOR_ARCHITECTURE");
String arch2 = System.getenv("PROCESSOR_ARCHITEW6432");
if (arch == null)
return 32;
if (arch2 != null) arch = arch2;
if (arch.compareToIgnoreCase("x86") == 0)
return 32;
else
return 64;
}
This handles the case where you're running inside a program that's in the 32 bit WOW emulator but really it's on 64, which is why we check two vars.
On unix it uses completely different code, to exec a command, "getconf LONG_BIT" for linux and "isainfo -b" for solaris.
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)