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
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: How to stop 32-bit installer from over installing 64-bit version
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
‎Nov 24, 2010
11:09 PM
How to stop 32-bit installer from over installing 64-bit version
I've got 2 install projects for the same product. Right now they have the same product code, although I can change them if I need to. My question is this. How do I stop the 32-bit version from over installing the 64-bit version and possibly vis-a-versa? I think I want, however; the 64-bit version to uninstall the 32-bit version if found. Seems the later is easy as I can just change my product code.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 25, 2010
09:11 AM
make unique productcodes(as updatecode and packagecode) and fill the upgrade table to detect the 32-Bit product and visa versa.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 01, 2010
05:51 AM
We have both 32 bit and 64 bit versions of the same application - which sounds like what you have. We prevent this by only allowing the 32 bit version to install on 32 bit system, not on 64 bit systems. Since a 64 bit installer will not even run on a 32 bit system we don't have to worry about that.
So - to prevent a 32 bit installer from installing on a 64 bit system I wrote a small, but simple Custom Action in VBS (Stored in binary table).
This CA is placed in the 32 bit installer early in the process.
If this returns IDABORT then the CA will cause the installer to abort gracefully.
If you allow users to install 32 bit program on a 64 bit system when a 64 bit version is available then I think it just gets complicated...
So - to prevent a 32 bit installer from installing on a 64 bit system I wrote a small, but simple Custom Action in VBS (Stored in binary table).
Option Explicit
'this custom action is designed to determine if the OS is 32 or 64 bit. It is meant to be included ONLY in 32 bit
'installs to warn the user when an actual 64-bit version of the application is available
Const IDABORT = 3
Const IDSUCCESS = 0
Dim strCaption
'AmI64Bit
Function AmI64Bit()
StrCaption = "32-bit OS"
On Error Resume Next
strCaption = GetObject("winmgmts:win32_OperatingSystem=@").OSArchitecture
On Error GoTo 0
If (InStr(strCaption, "64") > 0) Then
MsgBox "You are trying to install a 32 bit application onto a 64 Bit Operating System" & vbcrlf & _
"A 64-Bit version of this application is available." & vbcrlf & vbcrlf & _
"Please contact Customer Service for the 64 bit version of this application", vbOkOnly
AmI64Bit = IDABORT
Else
AmI64Bit = IDSUCCESS
'Call MsgBox(strCaption)
End if
End Function
This CA is placed in the 32 bit installer early in the process.
If this returns IDABORT then the CA will cause the installer to abort gracefully.
If you allow users to install 32 bit program on a 64 bit system when a 64 bit version is available then I think it just gets complicated...
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)