Controlling the location of the msi - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

MikeMurnane
Posts: 30
Joined: Wed Dec 08, 2010 5:46 pm

Controlling the location of the msi

Under Configuration tab of Builds page one can specify the folder in which to place the msi ... the help says that this will be either absolute or relative to the project root depending on the setting under project options / project paths. But when I move the build directory to a new location in the file system, the msi ends up back where it originally came from. Is this a bug?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Controlling the location of the msi

Hi Mike,
But when I move the build directory to a new location in the file system, the msi ends up back where it originally came from. Is this a bug?
By this, do you mean you manually( cut/paste ) moved the build directory on the hard drive? Can you please be more specific about this operation.

To understand how paths work please follow this article.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MikeMurnane
Posts: 30
Joined: Wed Dec 08, 2010 5:46 pm

Re: Controlling the location of the msi

Thank you for the pointer to the article. To clarify, I am moving the location of the directory containing the aip file to a different path on the disk. This is because the aip is stored along with other files for a build which is being executed by ant. I am executing AI using this XML:

Code: Select all

    <exec executable="AdvancedInstaller.com" dir="${install.dir}/AdvInstallProjects/">
      <arg line="/execute ${proj.install.type} ../${ai.commands}.txt"/>
The ${proj.install.type} is the name of the aip file located at ${install.dir}/AdvInstallProjects/ and I would like to place the msi in ${install.dir}. When I read the article it said that locations outside of the root "can" be absolute ... I was reading that to mean that they are usually relative. Have I misunderstood?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Controlling the location of the msi

Hello Mike,

You can set the paths' type for your project from the menu bar Project -> Options -> Project Paths tab. By default the paths are relative to the project root path except when they are on a different drive.
The project should output the build's MSI in the folder specified in the Builds page on the Configuration tab. Is the output build path not the one you have defined on the "Folder:" text field?

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MikeMurnane
Posts: 30
Joined: Wed Dec 08, 2010 5:46 pm

Re: Controlling the location of the msi

The output msi does go to the path specified in 'Folder' but it seems to absolute. When I move the project to a different location on disk (as I described above) the output msi is placed in the original location ... but I am attempting to place the msi in the directory above where the aip file is ... can this be done as a relative path ... the GUI always shows it as absolute and it behaves as absolute.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Controlling the location of the msi

Hello,

This should be the default behavior. Can you please send us the .AIP to support at advancedinstaller dot com so we can investigate it?

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MikeMurnane
Posts: 30
Joined: Wed Dec 08, 2010 5:46 pm

Re: Controlling the location of the msi

As I was packing up a small demo directory structure, I tested it and now it works as advertised ... it must be something in my environment that caused it before ... can you explain a bit how this might happen?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Controlling the location of the msi

Hello,

I am not sure why this could happen, I never encountered this before. The .AIP settings and some tests would have clarified this.
Can you remember what you changed that solved the issue and reproduce the initial behavior?

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MikeMurnane
Posts: 30
Joined: Wed Dec 08, 2010 5:46 pm

Re: Controlling the location of the msi

I was trying to determine where I wanted directories for the Ant build and was changing the "dir" attribute to the exec command, while at the same time editing the aip file via the GUI. I have been trying to re-create the events this morning but have not been able to do so. I will pay careful attention going forward so that if it happens again I will be in a better position to recreate. Thanks for you help.
MikeMurnane
Posts: 30
Joined: Wed Dec 08, 2010 5:46 pm

Re: Controlling the location of the msi

I am testing builds using Ant to create the edit commands ... and then execute a build. My ant build creates the edit command file containing:
;aic
SetPackageName BookCitationBuilder.msi
SetVersion -increment
SetProperty PROJECTNAME="BookCitationBuilder"
SetProperty SVNRELEASEVERSION="1.14.1.0"
NewSync LOADER_PLUSVERSION ..\..\dist
NewSync BASECONFIGROOT ..\..\dist\Automation\BaseConfigs
NewSync SCRIPTS_PLUSVERSION ..\..\dist\Automation\Scripts
NewSync SUPPORTCONFIGROOT ..\..\dist\Automation\SupportConfigs
Rebuild

Then I run the ant exec

Code: Select all

    <exec executable="AdvancedInstaller.com" dir="${install.dir}/AdvInstallProjects/">
                     <arg line="/execute ${proj.install.type} ../${ai.commands}.txt"/>
my aip file (${proj.install.type}) is located in ${install.dir}/AdvInstallProjects and my commands to the AI /execute command are also in ${install.dir} so I have referenced them as "../${ai.commands}.txt" (i.e. relative to the aip)

When the build is run via the GUI I get the msi in the place where I expect ... I then execute my ant build and it comes out in a different place.

I am attaching the build artifacts - set to the initial state - where I have edited and generated the aip with a build command from the GUI

To run the ant Build go to the project root (C:\test\Test2\test3\BookCitationBuilder_1.14.x) and type:
ant -f BuildScripts\TestRelease.xml build
Attachments
test3.7z
(875.27 KiB) Downloaded 629 times
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Controlling the location of the msi

Hello Mike,

Unfortuntely, we cannot reproduce the issue on our machines. Can you please specify the path where the build ends up when the behavior manifests? We may be able to make an assumption based on that.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MikeMurnane
Posts: 30
Joined: Wed Dec 08, 2010 5:46 pm

Re: Controlling the location of the msi

the result of the build on my machine is that the msi appears in C:\test\Test2\test3\BookCitationBuilder_1.14.x

Here is the console log snippet:

installer.ai.build:
[echo] LoaderSingleType02.aip
[copy] Copying 1 file to C:\test\Test2\test3\BookCitationBuilder_1.14.x\Install
[exec]
[exec] SetPackageName BookCitationBuilder.msi
[exec] SetVersion -increment
[exec] SetProperty PROJECTNAME="BookCitationBuilder"
[exec] SetProperty SVNRELEASEVERSION="1.14.1.0"
[exec] NewSync LOADER_PLUSVERSION ..\..\dist
[exec] NewSync BASECONFIGROOT ..\..\dist\Automation\BaseConfigs
[exec] NewSync SCRIPTS_PLUSVERSION ..\..\dist\Automation\Scripts
[exec] NewSync SUPPORTCONFIGROOT ..\\..\\dist\\Automation\\SupportConfigs
[exec] Rebuild
[exec] [ DefaultBuild ]
[exec]
[exec] Building package (en): C:\test\Test2\test3\BookCitationBuilder_1.14.x\BookCitationBuilder.msi
[exec] Creating CAB file(s)... done.
[exec] Creating MSI database... done.
[exec] Inserting CAB file(s) into MSI... done.
[exec] Writing Summary Information... done.
[exec] Build time: 4 sec.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Controlling the location of the msi

Hi Mike,
the result of the build on my machine is that the msi appears in C:\test\Test2\test3\BookCitationBuilder_1.14.x
This is the correct output path for your MSI. Isn't that the same path you have defined in the Configuration tab of the Builds page of your build?

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MikeMurnane
Posts: 30
Joined: Wed Dec 08, 2010 5:46 pm

Re: Controlling the location of the msi

At the end of the command line build it is ... but if you go into the GUI and set the folder (under Builds page) to "C:\test\Test2\test3\BookCitationBuilder_1.14.x\Install" and then build the project first with the GUI (a file called "SVN project Name.msi" gets generated in "Install" - this is correct) but then run the command line build and it comes out in C:\test\Test2\test3\BookCitationBuilder_1.14.x. Then, close the GUI and immediately re-open it ... you can see that the path has been changed. Note I did not have a save command in my edit file.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Controlling the location of the msi

Hi Mike,

This is happening because you have modified the default root path from the menu bar -> Project -> Options -> Project Paths tab. It is set to the Install folder and every path will be relative to that one.

To fix this, from the Project Paths tab select the "AdvInstallProjects" folder where you have your .AIP( the field should be set to blank ). Then, from the Builds page -> Configuration tab -> Folder field select the Install folder.

This way the output will always be in the Install folder.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”