Luftzugdackel
Posts: 13
Joined: Thu Dec 19, 2013 5:07 pm

How to change a variable value?

Hey guys,

the Advanced Installer is really cool but I have some trouble with variables.
What I want to do is changing the installation-directory if the user has a 64Bit OS or a 32Bit OS.
I created an environment variable "osBit" with the value "64Bit" but how can I change this value during the installation process?

I can not found an option for doing that!

Thank you for taking your time! :)

Andy
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: How to change a variable value?

Hello Andy and welcome to our forums,

Thank you for your interest in Advanced Installer.

In order to change an installer property value you can use our predefined Set installer property custom action from the Custom actions page.

Please note that are predefined properties which you can use in order to see if the target machine Operating System is on
32 bit or on 64 bit.
So, the installer sets the VersionNT64 property only if the system is running on a 64-bit computer. The property is undefined if the operating system is not 64-bit so you can use for the 32-bit computer something like NOT VersionNT64.

Please note that the Value field from the Environment variable dialog is of Formatted data data type so you can use a property in this field.
e.g. you can define a property in the Install parameters page. (e.g. osBitProp) with the 64Bit value.

Then, you can go in the Environment page you can define your environment variable like that:
Name: osBit
Value: [osBitProp]

So, on the 64-bit machine you will property create the environment variable with the according value, but this is not correct for the 32-bit machines.
In order to prevent this, you can go in the Custom Actions page and add our predefined Set installer property custom action with sequence and set the osBitProp property with the 32Bit value.

So you can have the Set installer properties custom action's properties like that:
-Property: osBitProp
-Value: 32Bit
and add in the Condition field the NOT VersionNT64 argument in order to change the property's value just for 32-Bit machines.

Please let us know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Luftzugdackel
Posts: 13
Joined: Thu Dec 19, 2013 5:07 pm

Re: How to change a variable value?

Hey Dan,

and thank you for your really great post! :)
I think it helps to understand how everything is in connection but to my regret I am not sure if it is working correctly:

WHAT I DID:

1.) My application path is: [PersonalFolder]\maya\[mayaVersion][osBitProp]
2.) Under Install Parameters I created a property "osBitProp" with the value "-x64"
3.) Under System Changes > Environment I created an environment variable "osBit" with the value "[osBitProp]"
(For what do I need this Environment Variable, on which state do I call it? As you can see on my first step I add the variable [osBitProp]. So why do I need this variable?)
4.) I created a Custom Action under "Custom Actions > Add Custom Action for Set installer property" with the following values: Property = [osBitProp], Value = -x86, and the Execution Stage Condition is set to "NOT VersionNT64"

Everytime I built my Setup-File my application path has always -x64 at the end. What I did to check my setup was to change the condition from NOT Version NT64 to VersionNT64 to change the predefined value in "osBitProp" from -x64 to -x86 if my System is a 64Bit-System. Nothing happends...what is going on? :)

Again, great tool and very powerful but at the moment not really easy to understand...but I continue :)

Andy
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: How to change a variable value?

Hi Andy,
(For what do I need this Environment Variable, on which state do I call it? As you can see on my first step I add the variable [osBitProp]. So why do I need this variable?)
For your scenario you don't need to create an Environment variable.
In my previos reply I've told you about this as a response to your request in the first reply:
I created an environment variable "osBit" with the value "64Bit" but how can I change this value during the installation process?
4.) I created a Custom Action under "Custom Actions > Add Custom Action for Set installer property" with the following values: Property = [osBitProp], Value = -x86, and the Execution Stage Condition is set to "NOT VersionNT64"
Can you please try to add the Set installer property predefined custom action with sequence in the Wizard Dialogs Stage after the Searches stage.

Please let us know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Luftzugdackel
Posts: 13
Joined: Thu Dec 19, 2013 5:07 pm

Re: How to change a variable value?

Damn, great Forum and help...now it is working! :D
My mistake was to set the Property between []. Thank you for your help I think I understand the program much better right now. :)
Now I will try to go further...but there is one more question:

If I create a Combo-Box and there a items called: Name = "Max 2012" Value = "2012" than the combo Box shows me the value and not the name. Is there any option where
I can say "show text label" or something like that?
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: How to change a variable value?

You're welcome.

In order to achieve that, please set the Combo List attribute with the True flag from the Combo Box control properties.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Luftzugdackel
Posts: 13
Joined: Thu Dec 19, 2013 5:07 pm

Re: How to change a variable value?

Hey,

yeah I am really happy...looks good and it is working.
Now I understand this incredible tool much better! :D

There are some little problems but I think I can work with it.
It is a little bit strange that the next button on the first page is changing from "Next" zu "Install" if I switch back to the first page.
I think that has to do with the Init Events? Thank you again for your great support! :D
Luftzugdackel
Posts: 13
Joined: Thu Dec 19, 2013 5:07 pm

Re: How to change a variable value?

I am not sure why that happens but everytime I go back from the InstallDlg the Next-Button is changing to an Install-Button. I checked the Events (Init, Published) and everything seems to be ok.
I created a new Dialogue called mayaVersionDlg, with next I can switch to the InstallDlg and there is a Back-Button with an Argument "mayaVersionDlg" and Event "Display a specific dialog" the condition is "AI_INSTALL".
Back to the mayaVersionDlg my Next-Button is an Install-Button.
Luftzugdackel
Posts: 13
Joined: Thu Dec 19, 2013 5:07 pm

Re: How to change a variable value?

I am getting crazy...it is 11:00 PM and the Next Button is switching from Next to an Install Button.
The next problem is that I can not delete alle the buttons I want.
Luftzugdackel
Posts: 13
Joined: Thu Dec 19, 2013 5:07 pm

Re: How to change a variable value?

No ideas for solving this problem?
Why is this simple step so complicated?

That is my FIRST TIME INSTALL - Tree:
Image
What I want is really easy: Go from the mayaVersionDlg to the next and there should be the opportunity
to go back or to install the tool.
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: How to change a variable value?

Hello,

I'm not sure why you got this. In order to have a better view about this, can you please send us the .AIP (project file) to support at advancedinstaller dot com so we can investigate it?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Luftzugdackel
Posts: 13
Joined: Thu Dec 19, 2013 5:07 pm

Re: How to change a variable value?

Hey Dan ...

... and thank you for your reply.
I uploaded my .aip-file with this post.

Here is a short description about it.
1.) Build the .exe and start it
2.) Click at the OK-Button
3.) Click at the Back-Button
4.) Click at the OK-Button
5.) Installation-process is starting but the OK-Button should not start any installation or something like that.
This button should just display the next page which is the Installation Dialog.

Thank you again for your help I hope we can fix this prob before christmas! :D LOL
Attachments
AelfscieneBOX_Test.aip
My .aip testfile!
(61.67 KiB) Downloaded 1059 times
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: How to change a variable value?

Hi,

Please note that the mayaVersionDlg is added in sequence. Dialogs with their name bold define the start of a dialog sequence. A dialog sequence refers to a set of dialogs that are displayed during the same Standard Action, so you cannot move dialogs between sequences or come back from a sequence to another. Also, each sequence must have at least a dialog left in its chain.

So, here is what you can do:
  • -Delete the mayaVersionDlg - it will be added in the Unused Dialogs tree
    -Select the PrepareDlg and add the WelcomeDlg dialog
    -Select the WelcomeDlg and add the mayaVersionDlg from the Project tab of the Add dialog window.
    -Delete the WelcomeDlg
It might be needed to delete the InstallDlg and add it once again (after the mayaVersionDlg)

Now, select the InstallDlg and delete Back image button you had added because on this dialog there is a Back button implementation but it is not visible. You can choose the Back button from the InstallDlg properties.
It will be show in the upper left side of the dialog. Drag-it and resize. Also, please set the True flag for the Visible attribute from button properties.

Please let us know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Luftzugdackel
Posts: 13
Joined: Thu Dec 19, 2013 5:07 pm

Re: How to change a variable value?

Hey Dan,

interesting that there is already a Back-Button available.
Yes it is working right now but there is now another problem.
The InstallDlg is now thin and the InstallDlg does not update
automatically the File-Path which depends on the customers settings on the WelcomeDlg.
In ather words: It looks like that the APPDIR Property is not updated.

Thank you so much for your help! :D
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: How to change a variable value?

Hello,

The InstallDlg allows the user to select the folder where the package will be installed and to open the "LicenseAgreementDlg" dialog. What custom changes do you have on the WelcomeDlg?

It would help a lot if you could provide us the latest version of the .AIP(project file) so I can have a better view. So, can you please send us the .AIP (project file) and summarize your expected behavior to
support at advancedinstaller dot com so we can investigate this?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Feature Requests”