Installshield 2012 : Identify 32 or 64 bit Operating system and install appropriate ActiveX control - Basic msi installer - 32bit-64bit

I have an ActiveX control which needs to be deployed in client machine and i am planning to do this by supplying installers to the clients .
I have made separate msi packages for 64 and 32 bit operating systems and it works properly.
However , i face a problem when it comes to 64 bit machines since i have the following requirement ,
In case of 32 bit machine install 32 bit ActiveX control.
In case of 64 bit machine install both 32 and 64 bit ActiveX control.
I read many articles stating hybrid installations cannot be done using basic msi installers ?
Can this be done using a single setup.exe file ?

A single MSI cannot both install files or registry to 64-bit locations on a 64-bit system and run on a 32-bit system. So assuming your 64-bit ActiveX control must be installed to or registered in a 64-bit location, you cannot do this in a single MSI.
If you have the premier edition of InstallShield 2012, this is one of the use cases of the Suite (or Suite/Advanced UI) project type. You must create two MSI files, and include them both in the suite with relevant eligibility conditions. (The exact conditions depend on whether you make the MSIs standalone or cumulative, but the 64-bit MSI should only be eligible if the platform has an architecture of x64.)

You can have both 32bit and 64bit components within a single installer and make it to decide what to install depending on the target platform as below.
1) Create two new features(one for 32 and one for 64) and add conditions to both of them.
for 32 bit -> Not VersionNT64
for 64 bit -> VersionNT64
2) Add both prerequisites and select appropriate (parent) feature for each one

Related

Creating Installshield Prerequisite for both 32bit and 64bit

I'm in the process of adding MySQL ODBC conector as a prerequisite in Installshield. Oracle provides two separate MSI for 32bit and 64bit and they dont support cross-architecture(32-64).
I'm able to add both of these modules as two separate prerequisite with two separate custom conditions to check for the exact architecture.(win32 or win64)
when I used both of these prerequisite in a setup project I'm not able to build it for 32 bit. If I build it for 64 bit the setup will support only for 64 bit PCs.
Is there any option to add both 32bit and 64 bit prerequisites to a single setup and make it run on both platforms and let it to decide to install the suitable version of the prerequisite.
prerequisite conditions are as below
User is running a particular OS -> Custom(Platform Id=Any, Major Version=10,Minor Version1, Service Packs=-,Product Type=Any, Platform Architecture=Win32, CSDVersion="", Build No=)
User is running a particular OS -> Custom(Platform Id=Any, Major Version=10,Minor Version1, Service Packs=-,Product Type=Any, Platform Architecture=Win64, CSDVersion="", Build No=)
PS- I'm using Installshield 2015 premier edition (SP1) with VS2013
The error msg when I tried to build it or 32bit is:
error -5008: intel64 or amd64 must be specified in the template of the summary
In the General Information view, Summary Information Stream section, set the Template Summary property to x64;1033. Note: If you live in a country where English is not the language, you will use a different language code from 1033.
This will make sure your installation if 64bit. In a 64bit installer, you can add 32bit components.

In Advanced Installer, how to detect a 32bit process within 64bit machine?

In Advanced Installer, how can I know if a 32bit process is running within a 64bit machine? I need to know this in order to prevent final users to install our application in given scenarios. Our approach is to use custom actions to detect if a given process is running, but it seems that Advanced installer isn't able to recognizes the ".exe *32" in the string end. Does someone know how to proceed in this situation?
This is not the correct approach. To stop users from installing the application on 64 bit machines you need to go to Launch Conditions page and uncheck all the 64-bit OS-es from the list. This will make your package to stop from installing on 64-bit machines.
Of course, for clients running a 64-bit OS you need to create a new setup package, that contains the 64-bit version of your application. For this package set the package type 64-bit AMD from Install Parameters page. Also, in Launch Conditions page make sure you uncheck all the 32-bit OS-es.
If you're really using a custom action to detect a particular 32-bit process, it's nothing to do with Advanced Installer. Your code enumerates the processes to find the one you want, does an OpenProcess() to get a handle and then calls IsWoW64Process, and closes the handle. If you have an x64 MSI file it won't install on a 32-bit system anyway, so I'm assuming that you are trying to prevent your x64 MSI file from installing on a 64-bit system if a certain 32-bit process is running.

How do we run IEdriverserver 32 & 64 bit simultaneously (.net binding)?

My goal is to run both IE 32 & 64 bit driver simultaneously.
Earlier i used only 32 bit IEdriver server , so i added the IEDriverserver as an embedded resource inside the executable. Now since i have two(both 32 & 64) IEdriverserver and since .net selenium bindings require the name to be standard(IEdriverserver).
Once way is to download the zip and place both drivers into two separate folder paths(but that would be my last option)
Using different paths is the correct way to go here. That's the way the executable was originally designed.
Also, you should be aware that embedding an executable as a resource and extracting it at runtime is begging to have your application flagged by anti malware products as suspicious. Libraries like .dlls are less likely to be so flagged, but .exes are often problematic.

Looking for script to add data source node to ODBC

I'm making installation script and I'm using ODBC, how can I automatically add a node to ODBC Data Sources.
Building installer with Visual Studio setup project, but I'm able to run any script for it.
Thank you.
1)
ODBC Data Sources are typically defined in registry entries - located at -
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI...... (DSNs on 32bit Windows or 64bit Windows)
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI...... (DSNs on 64bit Windows for 32bit Drivers)
That part of the registry contains the "System" DSNs - HKEY_CURRENT_USER contains "User" DSNs.
Of course, all drivers are different so there may be additional stuff required elsewhere too...
2)
You could also consider using File DSNs and ship the fie with the installer.
3)
You could also consider a DSN'less connection - but this would depend on how the ODBC application is coded.

32bit-64bit Installer Help

Looking for help to build a 32/64 bit installer. I've looked for help here already, found some from Mithriel but unfortunately I'm very new to editing registry keys.
I replied to his answer and posted my script but a Mod removed it. I apologize for any gap in etiquette.
I'm using InnoIDE to develop my installer. Essentially I just want it to be able to detect the chipset architecture and then load in the appropriate registry values.
From what I understand it looks like many are creating a parent installer that runs two other installer (one for 32 and 64 respectively). That's great but the files I will be copying to the install directory are about a GB. I can't really have those files
duplicated obviously.
I'm also looking for a way to delete a folder on install as well.
I can post script/email it to anyone willing to help me out.
J.
A little bit on "why" there is a need for a 32/64-bit installer. This doesn't answer the question, but has evolved too large for a comment. See the other comments in the original post.
The "problem" with using a 32-bit installer for a 64-bit application (and vice-versa) is due to Windows Registry Virtualization.
A 32-bit installer will (unless it uses special flags when writing to the registry write to the "32-bit view" of the registry and the application will see the "64-bit view"). If the application itself only runs in 32-bit then this doesn't matter and only a 32-bit installer is needed, of course. Like wise, if it only runs in 64-bit then only a 64-bit version of the installer is needed.
Happy coding.
while using inno setup i found a problem to writte to the 64 bits registery it seems that is differnet instruction while writting on 32 bits.
so it need more search and i will not got stocked for this.
Without being more specific with the question, the registry section of the documentation includes specific constants for 32- and 64-bit registry options. For example, see this section:
The values may have a suffix of 32 or 64. Root key values with a
suffix of 32 (for example, HKLM32) map to the 32-bit view of the
registry; root key values with a suffix of 64 (for example, HKLM64)
map to the 64-bit view of the registry.
Make a set of registry entries for each bit-ness, and in each entry, specify the the 32- or 64-bit registry root, and add a Check: IsWin64 parameter for the 64-bit registry entries. You should be able to invert that check on the 32-bit entries.

Resources