MSIEXEC fails to install package on EBS Windows instance

danere February 1, 2013

I'm using a stock image "Default Image EBS x86_64 (windows)" to attempt to build my database project file.

As part of my build plan, I am attempting to install an MSI package (in this case, a SQL Server Native Client) that is a dependency of my MsBuild project file.

To try and accomplish this, I'm calling the following command in my pre-build target:

msiexec /package http://go.microsoft.com/fwlink/?LinkID=239647 IACCEPTSQLNCLILICENSETERMS=YES /quiet

This should silently install the package so that my build will work. However what I'm getting instead is the following error:

The Windows Installer Service could not be accessed. This can occur if the Windows Installer is not correctly installed. Contact your support personnel for assistance.

Any ideas why this might be happening?

2 answers

1 accepted

2 votes
Answer accepted
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 2, 2013

It may be a permissions issue - the agent runs as Bamboo user. You can rewire it to other user. This will probably be helpful: https://confluence.atlassian.com/display/BAMBOO/Creating+a+custom+elastic+image+-+Windows . The linked page describes the process used to set up the image you're running.

danere February 2, 2013

That makes sense, although I was hoping to just use the default image. To give you a bit of context, I am writing a blog post on setting up SQL Server database builds with Bamboo and I was hoping to keep the barrier to entry low (read = minimal lead time/number of steps).

Are there any alternatives to creating a custom image? If not I might have a crack at sourcing the dependencies through NuGet rather than installing them onto the EBS instance.

Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 2, 2013

Hmm, maybe you could use an instance setup script (check your image configuration page in Bamboo) and run the command via runas ? You'd still need to run runas with /savecred first and save the image (make sure you run prepareInstanceForSaving.bat first) - but at least that does not sound overly complicated.

danere February 3, 2013

That could work. Actually after playing with this some more I've realised there's a couple more things I'd like on the image which can take a while to install. So I've decided against installing things during build and my latest thought is to create a public AMI with the dependencies pre-installed. Is this something you would recommend?

Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 3, 2013

Yeah, that sounds like a valid case where you'd want a custom image.

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 1, 2013

Have you tested it outside Bamboo? Does the user running the agent have the rights to use the installer?

danere February 1, 2013

Sorry I should have mentioned, yes I tried it outside of Bamboo and it worked. So as you say it seems like an access rights issue, however I don't know what the agent runs as (I presume it's SYSTEM however I can't see a Bamboo agent service listed on the instance).

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 1, 2013

I've only installed Bamboo once on a Windows box, and we created a user for it to run as, so we knew that permissions were down to "what that user could do".

I don't remember it running as "system", but I'm really not sure. It's definitely worth working it out. Even if you can't see "bamboo", have a look through the users for anyone running java.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events