Brahnsuk
Posts: 38
Joined: Thu Feb 10, 2011 6:06 pm

Set AppDir based on CustomSearch and OS-type

Fri Oct 31, 2014 4:35 pm

Hi,

I've already read some post about change the property for "AppDir", but I think the solutions are for later versions then our (8.9).
Our goal is it to set the AppDir for a 32-/64-Bit package (we've to change I think, now it is a 32-bit package), but not only based on the OS-type.

We want to decide the path based on MS-Visio (2010/2013) and the OS type (Win 7/8):
Visio x86 and 7 x86 = Install to "Program Files"
Visio x86 and 7 x64 = Install to "Program Files (x86)"
Visio x64 and 7 x64 = Install to "Program Files"
(Visio x64 and 7 x86 = Not possible)

Is there any chance with AI 8.9? We want also buy an Update for AI too, but later, not now.

thanks in advanced
Last edited by Brahnsuk on Mon Nov 03, 2014 2:24 pm, edited 1 time in total.
Current Version of AI: 16.5

Brahnsuk
Posts: 38
Joined: Thu Feb 10, 2011 6:06 pm

Re: Set AppDir based on CustomSearch and OS-type

Mon Nov 03, 2014 11:49 am

I searched again for some hours in the forum for my problem...
And if I get right I can use the "Set installer property" http://www.advancedinstaller.com/user-g ... #section33 for this.
If I'm right, can someone provide me guide how to set up this for AI 8.9 because the UI is different like in some posts described.

Any reply will be helpful, thanks.
Current Version of AI: 16.5

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Set AppDir based on CustomSearch and OS-type

Mon Nov 03, 2014 2:08 pm

Hi,

Indeed, you need to change the package type because a 32-bit package cannot write into a 64-bit location (i.e. Program Files on a 64-bit machine). So, to achieve what you want, you can follow the steps below:
- go in the "Install Parameters" page and choose the "Mixed 32/64 bit matching the platform" package type
- go in the "Search" page and create the appropriate search that will find the type of the installed Visio (i.e. VISIO_TYPE)
- go in the Custom Actions page and add two "Set installer property" custom actions after the "Wizard Dialogs Stage -> Searches" action group with the following configuration:
  • Property: APPDIR
    Value: [WindowsVolume]Program Files\[ProductName]
    Condition: VISIO_TYPE = "x86"

    Property: APPDIR
    Value: [WindowsVolume]Program Files (x86)\[ProductName]
    Condition: VISIO_TYPE = "x64"
- while the "SHIFT" keyboard button is pressed, drag and drop the custom actions after the "Install Execution Stage -> Searches" action group, to duplicate them
- set also the appropriate conditions for them
- click on the "Advanced execution scenarios..." blue link and check the "Skip action in Install Execution Stage if executed in Dialogs Stage" option
- build and run the project

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Brahnsuk
Posts: 38
Joined: Thu Feb 10, 2011 6:06 pm

Re: Set AppDir based on CustomSearch and OS-type

Mon Nov 03, 2014 2:25 pm

Hi Eusebiu,

thank you for your answer! I'll try it and let you know if it works.
Current Version of AI: 16.5

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Set AppDir based on CustomSearch and OS-type

Mon Nov 03, 2014 2:47 pm

You're welcome. Just let me know if any problem appears.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Brahnsuk
Posts: 38
Joined: Thu Feb 10, 2011 6:06 pm

Re: Set AppDir based on CustomSearch and OS-type

Mon Nov 03, 2014 3:59 pm

Eusebiu wrote: - go in the Custom Actions page and add two "Set installer property" custom actions after the "Wizard Dialogs Stage -> Searches" action group with the following configuration:
  • Property: APPDIR
    Value: [WindowsVolume]Program Files\[ProductName]
    Condition: VISIO_TYPE = "x86"

    Property: APPDIR
    Value: [WindowsVolume]Program Files (x86)\[ProductName]
    Condition: VISIO_TYPE = "x64"
- while the "SHIFT" keyboard button is pressed, drag and drop the custom actions after the "Install Execution Stage -> Searches" action group, to duplicate them
- set also the appropriate conditions for them
- click on the "Advanced execution scenarios..." blue link and check the "Skip action in Install Execution Stage if executed in Dialogs Stage" option
Ok, now I need your help again. Because this is the point I think the description is for new UI of AI (I've installed the new version as trial on a second computer). I tried to transmit your step's with the new open trial and our version (8.9).
If I understand your steps, I've to add a new Stage (=>Sequence?) "Searches".
Could you tell if this steps are possible with AI 8.9 and if yes how, maybe with some screenshots (for dummies :) ) or a sample project?
thanks again!
Attachments
2014-11-03 15_47_28-192.168.0.50 - Remotedesktopverbindung.png
2014-11-03 15_47_28-192.168.0.50 - Remotedesktopverbindung.png (72.64KiB)Viewed 10828 times
2014-11-03 15_48_28-192.168.0.50 - Remotedesktopverbindung.png
2014-11-03 15_48_28-192.168.0.50 - Remotedesktopverbindung.png (25.63KiB)Viewed 10828 times
Current Version of AI: 16.5

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Set AppDir based on CustomSearch and OS-type

Mon Nov 03, 2014 4:26 pm

Hi,

Indeed, the steps that I described were for the latest version of Advanced Installer, sorry for my mistake.
If I understand your steps, I've to add a new Stage (=>Sequence?) "Searches".
No, in the new versions of Advanced Installer there is already an action group called "Searches", but in the version 8.9 it is called "AppSearch", as displayed in the first image that you attached.

So, in this version you can right-click on the "InstallUISequence" and "Install Execute Sequence" folders, use the "Show Standard Action" option and display the "AppSearch" and "FindRelatedProducts" standard actions.

Then add "Property Set with Formatted" custom actions instead of "Set installer property" mentioned in my previous post and place them between the "AppSearch" and "FindRelatedProducts" standard actions. Also, set the "Execute only once if present in both sequence tables" option for them and the appropriate conditions. You can see the attached image.

Best regards,
Eusebiu
Attachments
Property Set with Formatted.png
Property Set with Formatted.png (57.82KiB)Viewed 10827 times
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Brahnsuk
Posts: 38
Joined: Thu Feb 10, 2011 6:06 pm

Re: Set AppDir based on CustomSearch and OS-type

Mon Dec 08, 2014 4:19 pm

Hi Eusebiu,

at first, sorry for the late reply!
Today I'm working further on the installer and try to set the properties you said. Until now it's all ok :)

But now I've 2 questions:
1. Since I changed the package type unter the "Install Parameter"s page from "32-bit package" to "mixed 32/64-bit matching the platform" I get another output, 3 additional files ("1033", "Setup.mst" and "Setup.x64.msi"), please see the image attached.
Is it normal if the package type changed to "mixed"?

2. Further more I think about if I need to change it...
Because, like the name of the type say's, it is match the platform => windows, but we want it depend on the Visio installation.
For the different situations of different Visio versions, we already have several searches to handle it.
So my question is, is it (in our case) necessary to change it to "mixed"? OR Is it possible to leave it as 32-bit package, because we handle anyway all the situations "by hand".

For us it is important that some files installed on different conditions (searches) in the right places, but even not on windows platform.
So, could you say, that the "mixed" package type does the same as if I handle the files to install on one or more conditions?

PS: The "64-bit" attribute for components (organization page) is it only for AI?

Thanks!
Attachments
2014-12-08 16_04_30.png
2014-12-08 16_04_30.png (12.01KiB)Viewed 10667 times
Current Version of AI: 16.5

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Set AppDir based on CustomSearch and OS-type

Tue Dec 09, 2014 11:27 am

Hi,
1. Since I changed the package type unter the "Install Parameter"s page from "32-bit package" to "mixed 32/64-bit matching the platform" I get another output, 3 additional files ("1033", "Setup.mst" and "Setup.x64.msi"), please see the image attached.
Is it normal if the package type changed to "mixed"?
Yes, this is normal. There are some transforms that will be applied on the 32-bit and 64-bit MSI packages in order to reduce the size of the packages. If you want to get rid of those files, you can check the "Build separate install databases" option from the "Mixed 32/64-bit Wizard" as in the attached image.
2. Further more I think about if I need to change it...
Because, like the name of the type say's, it is match the platform => windows, but we want it depend on the Visio installation.
For the different situations of different Visio versions, we already have several searches to handle it.
So my question is, is it (in our case) necessary to change it to "mixed"? OR Is it possible to leave it as 32-bit package, because we handle anyway all the situations "by hand".

For us it is important that some files installed on different conditions (searches) in the right places, but even not on windows platform.
So, could you say, that the "mixed" package type does the same as if I handle the files to install on one or more conditions?
I'm afraid that the package cannot be left as 32-bit package because, as I mentioned in my first post, a 32-bit package cannot write into a 64-bit location (i.e. Program Files on a 64-bit machine). So, even if you set the right conditions in a 32-bit package, it will not be able to copy the files in a 64-bit location.
PS: The "64-bit" attribute for components (organization page) is it only for AI?
No, this is a Windows Installer flag available in any MSI package.

Best regards,
Eusebiu
Attachments
Mixed 32-64 bit Wizard.png
Mixed 32-64 bit Wizard.png (50.08KiB)Viewed 10650 times
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Brahnsuk
Posts: 38
Joined: Thu Feb 10, 2011 6:06 pm

Re: Set AppDir based on CustomSearch and OS-type

Tue Dec 09, 2014 2:57 pm

Hi Eusebiu,

1. the output looks a little bit better :) the "Setup.x64.msi" file make sense, ok, but why still the "1033" (language file/dictionary) still in the output => with 32-bit package this does not happen, could I set any further properties?

2. we write also some registry values; now I've also to differentiate between 32/64 installation of visio. should I
- duplicate the values and handle it with features/conditions in the organization page (I also do that to other files)
or
- is there a similar property for registry paths like we do it with the APPDIR?

what is the better (or only) way?

thanks in advance and thank you for your patience :D
Current Version of AI: 16.5

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Set AppDir based on CustomSearch and OS-type

Wed Dec 10, 2014 10:30 am

Hi,
1. the output looks a little bit better the "Setup.x64.msi" file make sense, ok, but why still the "1033" (language file/dictionary) still in the output => with 32-bit package this does not happen, could I set any further properties?
That is a transform that is created when you have multiple languages in the package. A transform is created for each non-default language and I'm afraid that they cannot be hidden.
2. we write also some registry values; now I've also to differentiate between 32/64 installation of visio. should I
- duplicate the values and handle it with features/conditions in the organization page (I also do that to other files)
or
- is there a similar property for registry paths like we do it with the APPDIR?

what is the better (or only) way?
There isn't another property for registry paths like for the APPDIR, so you need to duplicate the values from the Organization page and set the appropriate conditions for them and also the "64-bit component" flag when necessary.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Brahnsuk
Posts: 38
Joined: Thu Feb 10, 2011 6:06 pm

Re: Set AppDir based on CustomSearch and OS-type

Tue Dec 16, 2014 8:23 am

Hi,

because I got a strange behaviour in test-installation, we bought the update and I got the new version!
All-clear: I found the reason. I set the conditions for the feature when to install it, but I don't set conditions when it don't have to install it. I found my mistake, because the new UI is better than the old one. GREAT!
Only as a hint for someone who reads this post ;)

So my question is actually, do I have to pay attention to something (old project - new version - Automatic Conversion)?
Current Version of AI: 16.5

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Set AppDir based on CustomSearch and OS-type

Tue Dec 16, 2014 9:59 am

Hi,

I'm glad you found the problem.

Indeed, we tried to improve the UI in the newer versions, but we also kept the compatibility between the newer and the older versions of Advanced Installer, so you do not need to worry about the conversions.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Brahnsuk
Posts: 38
Joined: Thu Feb 10, 2011 6:06 pm

Re: Set AppDir based on CustomSearch and OS-type

Tue Jun 16, 2015 10:51 am

Hi,

long time ago.... and now we've an unexpected behavior.
So I'll explain my problem more detailed and hope you've some hints or solutions for me:

Our needs:
- Our product is a Visio-AddIn
- We support Visio 2010 x86/x64 and above at Windows 7 x86/x64 and above
- We've to install files at "Program Files"/"Program Files (x86)" (dependent on where Visio is installed)
--- some files are 32-bit only, some are 64-bit only, a few common (independent) and some other specific to the installed Visio version (Visio2010x86, Visio2013x86, Visio2013x64 etc.)
- We've to install registry keys at HKCU/HKLM\SOFTWARE\ (and "Wow6432Note") (dependent where on Visio is installed)
- german/english language (but this is not the problem now)

Our setting untill now:
- mixed 32-/64-bit matching platform
- different features for the 32-/64-bit and the common files
- different searches to detect the installed Visio version (Visio2010x86, Visio2013x86, Visio2013x64 etc.)
- custom action which set the "APPDIR" property based on the searches

If you want or need the project file, I'll send it to you.

The main problem why I've to ask you again is, I found a problem at the searches for Visio at Visio2013x86 on a Windows7x86.
The searches for Visio2013x86 and Visio2013x64 are both true, although only one version is installed.
After some time I read in this last post http://www.advancedinstaller.com/forums ... 748#p55683 , this is the expected behavior for a search which has "Search the 64-bit portion of the registry" enabled on a WindowsX86.

Today I'm more confused like 6 months ago...
The main problems are
- how should I set the properties of a feature and this components? Specially
--- "Installation Behavior" (that I've the same behavior for the typical and custom installation for the invisible features)
--- "64-bit component", because they should installed dependent on the installed Visio version
- how could change my searches that it fits my needs?
(I already read a lot of in the forum and also the thread about "Outlook Bitness" registry key to determine if it is installed as x86 or x64, but I don't want to use this, because some customer have installed Office 2013 as x64 and Visio 2010 as x86 version, strange but possible)

A lot information and questions, but I would be very grateful if you would help me!
Current Version of AI: 16.5

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Set AppDir based on CustomSearch and OS-type

Wed Jun 17, 2015 8:09 am

Hi,
The main problem why I've to ask you again is, I found a problem at the searches for Visio at Visio2013x86 on a Windows7x86.
The searches for Visio2013x86 and Visio2013x64 are both true, although only one version is installed.
After some time I read in this last post http://www.advancedinstaller.com/forums ... 748#p55683 , this is the expected behavior for a search which has "Search the 64-bit portion of the registry" enabled on a WindowsX86.
This should not be a problem for you because even if both searches are true, only the "Visio2013 x86" version can be installed on a 32-bit machine. So, if the machine is a 32-bit one (condition NOT VersionNT64), you will be sure that the "x86" version of the Visio product is installed.
--- "Installation Behavior" (that I've the same behavior for the typical and custom installation for the invisible features)
If a feature is invisible, then it will have the same behavior for the typical and custom installation because the user will not be able to change its state from the UI as long as it is not displayed.
--- "64-bit component", because they should installed dependent on the installed Visio version
I'm afraid I do not fully understand this requirement, can you please give me more details?
how could change my searches that it fits my needs?
You can search for the "Outlook Bitness" registry key to determine the Office version and for a registry entry or a file related to Visio to determine its version.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”