Is there a way to obtain the previous version destination directory (where the previous version was installed to)?
I have a database file (which is marked as a permanent file - do not uninstall) which needs to be upgraded with the new version. The new version of the application will check for the existence of this file and if found, will upgrade it... but it needs to be in the directory where the new version is installed.
Previous version destination directory
-
FrancescoT
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Previous version destination directory
Dear User,
You can use the "Save Feature Selections" & "Load Feature Selections" commands, to save and load feature selections manually only if you wish to migrate feature selection states between different versions of a setup. This command also saves/ loads the values of any persistent variables, the pre-defined variables TARGETDIR, STARTMENU and ALLUSERS, and the installation processor architecture.
Alternatively you can store the TARGET value, within a file or using registry, during installation and then loading it, when upgrading.
Regards.
You can use the "Save Feature Selections" & "Load Feature Selections" commands, to save and load feature selections manually only if you wish to migrate feature selection states between different versions of a setup. This command also saves/ loads the values of any persistent variables, the pre-defined variables TARGETDIR, STARTMENU and ALLUSERS, and the installation processor architecture.
Alternatively you can store the TARGET value, within a file or using registry, during installation and then loading it, when upgrading.
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
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
Re: Previous version destination directory
Is there some trick to getting the previous settings to load? I have spent a long time trying to work out why the settings refuse to load for me. They save to the file correctly. I place the Load Feature Selections after the Define Component options. But my settings never update and always show as the default when the install is run again. I dont have any commands selecting components. If i step through and debug it setting SELECTED to the component value i get nothing before the file is loaded and nothing after it is loaded. I have tried both Native and Windows Engines.
-
FrancescoT
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Previous version destination directory
Dear Agrogers,
maybe I'm wrong, but I believe you are doing something wrong.
The "Load Feature Selections" must be used in combination with "Save Feature Selections", are you doing that?
Alternatively, if you want to store your data with a file, are you saving and loading it correctly?
Then about the "Save / Load Feature Selections" command, there are some important notes to take in account as reported with IA documentation.
Load Feature Selections
This command loads feature selections that were previously saved using the Save Feature Selections command. Feature selections indicate the features chosen to be installed by the user during a custom setup.
This command also loads the values of any persistent variables, the pre-defined variables TARGETDIR, STARTMENU and ALLUSERS, and the installation processor architecture.
*It is not necessary to manually save and load feature selections in the same version of a setup (that is, setups which have the same product and revision codes). In the same version of a setup, feature selections are saved and loaded automatically by the setup engine.
*Save and load feature selections manually only if you wish to migrate feature selection states between different versions of a setup.
*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.
Regards.
maybe I'm wrong, but I believe you are doing something wrong.
The "Load Feature Selections" must be used in combination with "Save Feature Selections", are you doing that?
Alternatively, if you want to store your data with a file, are you saving and loading it correctly?
Then about the "Save / Load Feature Selections" command, there are some important notes to take in account as reported with IA documentation.
Load Feature Selections
This command loads feature selections that were previously saved using the Save Feature Selections command. Feature selections indicate the features chosen to be installed by the user during a custom setup.
This command also loads the values of any persistent variables, the pre-defined variables TARGETDIR, STARTMENU and ALLUSERS, and the installation processor architecture.
*It is not necessary to manually save and load feature selections in the same version of a setup (that is, setups which have the same product and revision codes). In the same version of a setup, feature selections are saved and loaded automatically by the setup engine.
*Save and load feature selections manually only if you wish to migrate feature selection states between different versions of a setup.
*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.
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
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
Re: Previous version destination directory
Thanks for the reply Francesco.
I am using the Save Feature Selections. The file is saving fine and i can see all the properties set correctly. I save the file immediately after the dialogs are processed. I load the file immediately *after* the components are defined. So i think i am following the instructions correctly.
The reason i need it is because i want to change the version number of the install. Obviousuly the selections are restored by default when doing a standard repair etc. But i want to restore them across versions which i understand this option was intended for.
Any other tips? Or ways to debug?
Thanks
Andrew
I am using the Save Feature Selections. The file is saving fine and i can see all the properties set correctly. I save the file immediately after the dialogs are processed. I load the file immediately *after* the components are defined. So i think i am following the instructions correctly.
The reason i need it is because i want to change the version number of the install. Obviousuly the selections are restored by default when doing a standard repair etc. But i want to restore them across versions which i understand this option was intended for.
Any other tips? Or ways to debug?
Thanks
Andrew
-
FrancescoT
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Previous version destination directory
Dear Andrew,
... but you can't change the Installation package at runtime, this must be defined at compile time.
is this what you are trying to do or I'm missing something?
Regards
... but you can't change the Installation package at runtime, this must be defined at compile time.
is this what you are trying to do or I'm missing something?
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
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

