/build/static/layout/Breadcrumb_cap_w.png

how I get if windows is x64 or 32 bit to set a condition

how I get if windows is x64 or 32 bit

My purpose is set a condition for a component to install depending if 32 or 64


0 Comments   [ + ] Show comments

Answers (6)

Answer Summary:
Posted by: EdT 8 years ago
Red Belt
1

Top Answer

This is all overly complex if it is just a condition that is being set.
The predefined property VersionNT is true for any version of NT
The predefined property VersionNT64 is true for any version of 64 bit NT
Since I would assume there are no machines running any version of windows not based on NT, you can just use VersionNT64 as the condition for anything that needs to be "True" for a 64 bit operating system and "False" for a 32 bit operating system. 
Alternatively: NOT VersionNT64 for any condition that needs to be "False" for a 64 bit operating system, or "True" for a 32 bit operating system.
Posted by: dunnpy 11 years ago
Red Belt
0

Not really sure what your question is, but you can condition a component to be 64-bit in Installshield - '64-Bit Component - yes/no' , or you could apply a condition using 'versionNT' numbers to specify whether it is installed or not based on the OS.

 

Hope that helps,

Dunnpy

 

Posted by: jaybee96 11 years ago
Red Belt
0

MSI will be either 32bit or 64bit in the first place.
so if you want to install 32bit info with a 64bit installer , you will need to use the correct Conditions for that  like VerionNT64 

Posted by: StockTrader 11 years ago
Red Belt
0

I think you're after this script:

 

@echo off 

  

if %PROCESSOR_ARCHITECTURE% == x86 ( 

goto :x86 

) else ( 

goto :x64 

) 

  

:x86 

REM put here x86 application to execute like this example FOO.EXE executabe

start "foo.exe" 

 

goto :eof 

  

:x64 

REM put here x86 application to execute like this example BAR.EXE executabe

start "bar.exe" 

goto :eof
REM put here some common code for both architectures

 

:EOF

 

 

 Kind regards,

StockTrader

 

Posted by: MoranTug 11 years ago
Senior Purple Belt
0

Here is how we do it.

I create a folder and dump both the x64 and x32 msi files in it. I then create a batch file that looks like this

 

@echo off
IF %Processor_Architecture% == x86 goto x86
goto x64
:x86
start /wait msiexec.exe /i install_flash_player_11_active_x_32bit.msi /qr
goto done
:x64
start /wait msiexec.exe /i install_flash_player_11_active_x_64bit.msi /qr
goto done
:done
echo "script complete"

I then take all 3 put it in a zip file and then create a new software inventory item and upload this is a package. Then using a script I just deploy this software package and tell it to execute the bat file I created.

 

 

Posted by: Chad_Arvay 11 years ago
White Belt
-1

Everything above looks great and is the correct way of doing it, you can also do as  simple as the following

if c:\program files (x86) exists then etc etc

 

else

etc

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ