Determine which architecture installation mode is the Install running

Got a problem you cannot solve? Try here.
p3v
Posts: 3
Joined: Thu May 05, 2011 12:16 pm

Determine which architecture installation mode is the Install running

Postby p3v » Wed Feb 01, 2017 6:47 pm

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.

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: Determine which architecture installation mode is the Install running

Postby FrancescoT » Thu Feb 02, 2017 1:35 pm

Dear p3v,

you may use a custom script variable to keep track of the current architecture used by your script.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

p3v
Posts: 3
Joined: Thu May 05, 2011 12:16 pm

Re: Determine which architecture installation mode is the Install running

Postby p3v » Thu Feb 02, 2017 3:48 pm

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

p3v
Posts: 3
Joined: Thu May 05, 2011 12:16 pm

Re: Determine which architecture installation mode is the Install running

Postby p3v » Thu Feb 02, 2017 4:44 pm

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.

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: Determine which architecture installation mode is the Install running

Postby FrancescoT » Fri Feb 03, 2017 6:57 am

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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: Baidu [Spider] and 41 guests