Changing TargetDir in Component.prototype.beginInstallation
-
I have an application which I want to install files in 2 different directories, Say FixedDir and SelectableDir. I also want the installer base files (maintenancetool.exe , installerResources etc) to be installed in the FixedDir. Also I want the User to be able to select the SelectedDir as TargetDir
1- Is there a way to instruct the QTIFW to install the base installers files in a directory other than the TargetDir.I found a solution for the above question: I let the SelectedDir to be the TargetDir. Then I swap the SelectedDir and the TargetDir in the installscript.qs as follows:
Component.prototype.beginInstallation = function()
{
installer.setValue("SelectedDir", "@TargetDir@");
installer.setValue("TargetDir", "C:\Users\Public\Documents");
component.beginInstallation();
}Everything seems to be fine. Is this solution safe?