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

Re: Set AppDir based on CustomSearch and OS-type

Wed Jun 17, 2015 10:31 am

Hey Eusebiu!
Thanks for your reply!
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.
For this I've to think about my different constellations and maybe I'll ask you again :oops:
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.
Ok. I'm a little bit unsure because I set the "Installation Behavior" for the invisible features to "Not installed" (I want handle if it should be installed) and set always a condition for "Install if" (my condition) and "Disabled if" (I set a condition for that, because I see at "More Options" the setting "When all conditions are false, use the following level"=4(complete); I'm not able to set it to 0, because I already set it to "Not installed").
Which setting has the higher priority? "Not installed" or "When all conditions are false, use the following level"?
What would be the best way for me? Set only a condition for "Install if" or for "Disabled if" too?
2015-06-17 11_02_29.png
2015-06-17 11_02_29.png (31.68KiB)Viewed 6516 times
--- "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?
As you can see at the pictures, there is the option for "Mark components in this feature as '64-bit component'" (for the whole feature or single component);
should I set this option for my components that are only for Visio-x64 or for the registry keys?
2015-06-17 11_02_29.png
2015-06-17 11_02_29.png (31.68KiB)Viewed 6516 times
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.
If possible I don't want to use this method, please see my post before.

Thanks in advance
Attachments
2015-06-17 11_01_14.png
2015-06-17 11_01_14.png (29.53KiB)Viewed 6516 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

Thu Jun 18, 2015 7:25 am

Hi,
Which setting has the higher priority? "Not installed" or "When all conditions are false, use the following level"?
What would be the best way for me? Set only a condition for "Install if" or for "Disabled if" too?
In the image that you attached they are practically the same option, such that if you change one of them the other will be also be changed. The "When all conditions are false, use the following level" option will always be related to the default option from the "Installation Behavior" section.
As you can see at the pictures, there is the option for "Mark components in this feature as '64-bit component'" (for the whole feature or single component);
should I set this option for my components that are only for Visio-x64 or for the registry keys?
You need to set that option for all the components (registry and files) that are related only to Visio x64. Those that are related to Visio x86 should not have that option set.
If possible I don't want to use this method, please see my post before.
I'm afraid that I'm not aware of another method. You can only detect the bitness of a software by searching its related registry entries or files. Otherwise you can try to create your own custom action with this functionality.

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 Jun 22, 2015 3:06 pm

Hi,
The "When all conditions are false, use the following level" option will always be related to the default option from the "Installation Behavior" section.
That means if I set "Not installed" and only set a condition for "Installed if", which'll fail, nothing is installed?
If so, the option "When all conditions are false, use the following level" is very confusing, specially with the level 4 (Complete).
Maybe it is possible for a future release to make this point optional with a checkbox.

PS:
And maybe a another improvement for searches at registry, an additional checkbox for "search only in 64-bit location" :)

Thank you for your help!
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 Jun 23, 2015 10:51 am

Hi,
That means if I set "Not installed" and only set a condition for "Installed if", which'll fail, nothing is installed?
Yes, if the condition from the "Installed if" is false, the feature will not be installed.
If so, the option "When all conditions are false, use the following level" is very confusing, specially with the level 4 (Complete).
As I already mentioned, this option is related to the default one from the "Installation Behavior" section. In this case, when all conditions are false, the install lever of the feature will be set to "4", which means that the feature will be installed only if a "Complete" installation of the package is made.

You can go in the "Dialogs" page and see that you can add a predefined dialog called "SetupTypeDlg" which has the "Typical", "Custom" and "Complete" buttons available. When the "Complete" option is chosen on that dialog, a feature will be installed even if the "Not Installed" option is set for it as default.
Maybe it is possible for a future release to make this point optional with a checkbox.
I do not think that this point should be optional as long as it is only the reflection of the option chosen as default in the "Installation Behavior" section.
And maybe a another improvement for searches at registry, an additional checkbox for "search only in 64-bit location"
Do you mean that through this option the search should not be performed on a 32-bit machine? Can you give me more details about what the option should do and why do you need it, so we can better evaluate it?

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 23, 2015 12:15 pm

Hey!
Do you mean that through this option the search should not be performed on a 32-bit machine? Can you give me more details about what the option should do and why do you need it, so we can better evaluate it?
Exactly what you write, something like this
2015-06-23 12_46_44-Clipboard.png
2015-06-23 12_46_44-Clipboard.png (5.87KiB)Viewed 6486 times
My main problem is to detect if visio is installed as x64.
For Office there is a great solution at the registry, but not 100% for visio, why = I already wrote this.

Because of this, that a "64-bit-search" found a value at a windows86 (in my case), I spent some hours to find my problem/fail.
I couldn't read anything about this behaviour in your documentation (e.g. http://www.advancedinstaller.com/user-g ... rties.html), only in a thread is the answer (http://www.advancedinstaller.com/forums ... 748#p55683)
So this is my suggestion.



I have followed your instructions about the conditions for the feature in a test-project. As I can see at the files and folders it looks good.
I set this conditions for my real project and have the same behaviour as before. I decided to make a installation log of the test-project, so can compare it to my project (start from command line msiexec /i "C:\TestProject-SetupFiles\Setup.msi" /L*V "C:\Test_InstallationLog.log"), but I only get a error "This package can only be run from a bootstrapper". I ensured that the setting at Builds/Configuration and Dialogs/Bootstrapper UI are the same (only difference is that my project is multi-language).
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

Tue Jun 23, 2015 1:11 pm

Additional:

Searches (at Win7x86 with Visio 2013 x86 installed)
VISIO2010X86: ''
VISIO2013X86: '15.0.4420.1017'
VISIO2013X64: '15.0.4420.1017'

see attachments: the one should be installed, and the other not!, AI tries to install both and as result I get a mix of both...
Attachments
2015-06-23 14_05_46-Clipboard.png
2015-06-23 14_05_46-Clipboard.png (5.13KiB)Viewed 6479 times
2015-06-23 14_05_14-Clipboard.png
2015-06-23 14_05_14-Clipboard.png (5.16KiB)Viewed 6479 times
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

Tue Jun 23, 2015 1:41 pm

ok, maybe now.... (your hint with the "dialogs"-page)

I want handle some sub-features always by conditions (they are always "Not Displayed") IDEPENDET of the SetupType ("Typical", "Custom" and "Complete", that's it what you mean as "Installation Behavior"?):

if I set "Not installed" and a condition for "installed if" I get a different behavior during the installation between "Custom" and "Complete", right? (and this is not what I want)

so I could either set additional a condition for "Disabled if"
OR
I could set these sub-features to "Disabled" and set a condition for "installed if"
to always handle this features "by hand", independent what SetupType is chosen from the user!?
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 24, 2015 10:33 am

Hi,
My main problem is to detect if visio is installed as x64.
For Office there is a great solution at the registry, but not 100% for visio, why = I already wrote this.

Because of this, that a "64-bit-search" found a value at a windows86 (in my case), I spent some hours to find my problem/fail.
I couldn't read anything about this behaviour in your documentation (e.g. http://www.advancedinstaller.com/user-g ... rties.html), only in a thread is the answer (http://www.advancedinstaller.com/forums ... 748#p55683)
So this is my suggestion.
In order to set a condition that is true only on a 64-bit machine, you can use the "VersionNT64" property, so even if the "Visio64" search is true on a 32-bit machine, the feature will not be installed because the "VersionNT64" property is empty.
I have followed your instructions about the conditions for the feature in a test-project. As I can see at the files and folders it looks good.
I set this conditions for my real project and have the same behaviour as before. I decided to make a installation log of the test-project, so can compare it to my project (start from command line msiexec /i "C:\TestProject-SetupFiles\Setup.msi" /L*V "C:\Test_InstallationLog.log"), but I only get a error "This package can only be run from a bootstrapper". I ensured that the setting at Builds/Configuration and Dialogs/Bootstrapper UI are the same (only difference is that my project is multi-language).
This message appears if you have an EXE package and try to run the MSI package that is related to it. You can see the Why do I receive the "This package can only be run from a bootstrapper" message FAQ.

In order to create a log from an EXE package, you can use the following command: "C:\TestProject-SetupFiles\Setup.exe" /L*V "C:\Test_InstallationLog.log"
see attachments: the one should be installed, and the other not!, AI tries to install both and as result I get a mix of both...
On a 32-bit machine, only the "Visio x86" feature should be installed, but if you want only the "Visio x64" feature to be installed on a 64-bit machine, then you need to add the following condition to the "Visio x86" feature: AND NOT VersionNT64
I want handle some sub-features always by conditions (they are always "Not Displayed") IDEPENDET of the SetupType ("Typical", "Custom" and "Complete", that's it what you mean as "Installation Behavior"?):
Yes, this is what I meant.
if I set "Not installed" and a condition for "installed if" I get a different behavior during the installation between "Custom" and "Complete", right? (and this is not what I want)
Yes, depending on what features the user will select when he chooses the "Custom" option, you may get a different behavior between "Custom" and "Complete" options. The "Complete" option will install all the features, except from those that are set to "Disabled".
so I could either set additional a condition for "Disabled if"
OR
I could set these sub-features to "Disabled" and set a condition for "installed if"
to always handle this features "by hand", independent what SetupType is chosen from the user!?
Yes, you can use any of these two methods. You can also go in the "Dialogs" page, select the "Complete" button and disable it, so the user will not be able to use it anymore.

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

Wed Jun 24, 2015 12:32 pm

Hi,

thank you for your reply, I think my big problems are solved.

But (hopefully last) questions about the bootstrapper error:

1. Our project was started in version 8.0.2, is there a missing conversion, because I never had this error. And I builded the project several times the last days with v12.2. I only got this error with the new created test-project.
2. Our customer sometimes use "msi packaging"-software for roll-out / deployment.
Does this affect the behaviour?
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 24, 2015 1:01 pm

Hi,
1. Our project was started in version 8.0.2, is there a missing conversion, because I never had this error. And I builded the project several times the last days with v12.2. I only got this error with the new created test-project.
That is not an error, that is a warning, a launch condition that prevents a MSI to run outside its related bootstrapper. You can see why that was introduced, in the FAQ that I mentioned in the above post.
2. Our customer sometimes use "msi packaging"-software for roll-out / deployment.
Does this affect the behaviour?
Yes, I'm afraid that the package cannot be installed in silent mode either. A solution to suppress that message is described in the Launch MSI directly when building with bootstrapper thread.

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

Return to “Building Installers”