Page 1 of 1
Determine which architecture installation mode is the Install running
Posted: Wed Feb 01, 2017 6:47 pm
by p3v
I need to determine if the installer is running in 32bit or 64bit installation mode in one of my scripts. It installs 3rd party software for which I need to check both 32bin and 64bit registry entries. I know I can switch the install mode, but I want to be able to switch it back to what it was before I changed it in my script. We are using this script in different installers and if I switch the architecture to 64bit and back to 32bit in my script without checking what it was before, I could inadvertently affect the installer that is using my script.
Re: Determine which architecture installation mode is the Install running
Posted: Thu Feb 02, 2017 1:35 pm
by FrancescoT
Dear p3v,
you may use a custom script variable to keep track of the current architecture used by your script.
Regards
Re: Determine which architecture installation mode is the Install running
Posted: Thu Feb 02, 2017 3:48 pm
by p3v
FrancescoT,
I need to be able to tell what architecture the main installer is using when it calls my script. I don't have a problem keeping up with changes within my script. I just need to return it to where it was before my script was called. Since this script is used by many other installers, I would need to go back and modify each of them to prevent any problems. This cascades into whole set of problems with retesting everything, which I am trying to avoid.
Thanks
Re: Determine which architecture installation mode is the Install running
Posted: Thu Feb 02, 2017 4:44 pm
by p3v
For now, I check for processor architecture. If it is 64 bit, I check if the system->Program Files Directory has (x86) in it and if it does, I change the install mode to 64 bit and then back when I am done.
I wish there was more straight forward and more reliable way to tell which install mode I am in built into installaware.
Re: Determine which architecture installation mode is the Install running
Posted: Fri Feb 03, 2017 6:57 am
by FrancescoT
Dear p3v,
I am not quite sure to follow your approach and which is your effective target. In all honesty I have the feeling that you're complicating something that is very simple actually.
At any rate consider that by default, unless explicitly stated otherwise, a setup package Runs in 32 bit native mode.
Due of this and as I already said, you may use a script variable to keep track of your current x86/x64 state. Script variables are GLOBAL variables Always. You may declare it at the very beginning of you main script or you may use a specific script where you declare it. Of course if you use a dedicated script, you can check for such variable successively the script inclusion only.
Hope this helps you.
Regards