Product Version, Revision Code and Persistant Variables

Got a problem you cannot solve? Try here.
Dany
Posts: 13
Joined: Mon Feb 22, 2016 6:58 am

Product Version, Revision Code and Persistant Variables

Postby Dany » Mon Feb 22, 2016 7:39 am

I'm struggling to create a pattern for updates to a product. I understand that the native engine stores a database on the target system and thus in order for the product to remain "clean" an uninstall must be performed before the update. This is quirky but manageable, i have changed some of the application settings behaviour to comply.

If i change the "Product Version" i can use the updates.ini to get updates run. Ideally an update should update, here it uninstalls and then installs. The problem is mainly three things, the component selection, the TARGETDIR and one of my own INSTANCENAME.

If i "Set Persistant Variable" it will only work if the Revision Code remains the same /between/ product versions. At least this far i see the persistant variables not being persistant anymore as soon as i change the Revision Code (i have not checked the component selection yet). This feels very strange and this whole post is about confirming that this is the intended behaviour [actual question 1 here]. Should i persist the revision code between product versions [actual question 2 here]?

Also, if i have the same Revision Code between Product Versions, the installer will not understand that an uninstallation must be done before the installation. Maybe i can alleviate this by comparing the Product Version, but that will entail the same problems with persistance...

Persisting by writing to a file does not cut it because the uninstallation removes said file. With a (per documentation recommendation) changed Revision Code between builds the TARGETDIR is also reset to "default". I'll also be having problems updating secondary instances but that can of worms will remained closed until i get this solved.

A note aside; trying to create a patch (not related to the above), i saw a post here recommending to save the project in a different folder under the same project name and then change the product version and the output filename. However, when you do this only the project file and dialogs get saved in the new directory (at least if they are on the same level) and the scripts gets referenced in the project file in the old directory. So when i started to change paths using the file tool i ended up with an indescribable mess. Now, when trying to create a viable pattern for updates i copied the whole directory first. That works better BUT the directory isn't stated in the main window title bar nor in the open/reopen dropdowns and dialogues. This makes it difficult and dangerous to work with two different versions. Either the path or the product version should be clearly shown, IMHO.

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

Re: Product Version, Revision Code and Persistant Variables

Postby FrancescoT » Mon Feb 22, 2016 1:28 pm

Dear Dany,

why don't you follow the approach described by the "Features sample (2)" from the following link?
http://www.installaware.com/forum/viewtopic.php?f=2&t=6772
This illustrates how to keep track of features selection and TARGETDIR, with different version of a setup.

For what concerns PATCHES, you must keep the same product version.
I suggest you to have a look at following topics, where are available useful information on how to avoid common errors with patch creation.

It's also available a Full Functional and ready to use sample with the second link below.

- http://www.installaware.com/forum/viewtopic.php?f=2&t=9656&hilit=+patch
- http://www.installaware.com/forum/viewtopic.php?f=2&t=8697

To make a copy of an existing project you can use the "save Project As" command from the IA file menu.

When you create a copy of an existing project with storing it under a different folder, you must consider that your new project, because it's the exact copy of the original, this continues to use the same identical settings of the original project.

For example, if project "A" uses a main script file named "A script", the project B which is the copy of project A, continues to use the same identical main script file.

To make your "clone" project completely independent from the source project, you also have to explicitly save the main script file under the new project directory as well.

So once you saved the "clone project"; switch to the MSI code view, right click your main script file within the the left tree pane (the "Script" node) and then select "Save Script file as...".

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

Dany
Posts: 13
Joined: Mon Feb 22, 2016 6:58 am

Re: Product Version, Revision Code and Persistant Variables

Postby Dany » Tue Feb 23, 2016 11:00 am

Thank you, Francesco!

I wrote a long anser here, but either it's not approved or some such thingy happened with the phpBB system. Anyway it was to the effect that a lot of other posts here also states, so it wasn't creative.

Regarding the sample, the documentation states

Selection states will be ignored for all features not explicitly defined in the setup script using the Define Component command by the time the Load Feature Selections command executes in the script. Therefore, make sure the Load Feature Selections command comes after all the Define Component commands in your script.


but in the sample some extra persistent variables are used.

Comment would be appreciated.

Thanks again,

/Dany

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

Re: Product Version, Revision Code and Persistant Variables

Postby FrancescoT » Tue Feb 23, 2016 1:36 pm

Dear Dany,

the sample uses "Load Feature Selections" only when a different version of the package gets executed.
Instead it uses the persistent variable values with the same package version (maintenance mode).

Reagrds
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

Dany
Posts: 13
Joined: Mon Feb 22, 2016 6:58 am

Re: Product Version, Revision Code and Persistant Variables

Postby Dany » Tue Feb 23, 2016 1:48 pm

Ah! OK, tanks!

/D

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

Re: Product Version, Revision Code and Persistant Variables

Postby FrancescoT » Tue Feb 23, 2016 1:55 pm

:D
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: vaibhavopkey and 124 guests