[wix-users] Issue installing via TFS agent

Andrew Moser malquijelkah at gmail.com
Fri Oct 14 06:48:26 PDT 2016

Environment Details: Installation package is created via a TFS continuous
integration build process (using Wix 3.10.3) that has an agent on the
deployment test server (A TFS user is running as a service on the release
box) where I am having the issue below. Package is downloaded and installed
via the release agent of TFS using the powershell function (NOT powershell
on targeted machine) with this script, which runs the installation in admin
mode if not already in admin mode.

If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]
    Echo "This script needs to be run As Admin"
    Start-Process powershell -ArgumentList '-noprofile -file
[ps1file]' -verb RunAs
    Echo "Running as Admin"
    MSIEXEC /i "[PathToMSI]" /qn /L*v "[PathToLog]"
    Echo "Script complete"

First off I can install this product without issue the first time on the
server in question, it is the updates that are producing strange behavior.
The agent automated update produces this error code.

MSI (s) (34!1C) [16:27:41:979]: Doing action: StartIIS7ConfigTransaction
MSI (s) (34!1C) [16:27:41:979]: Product: MyProduct -- Error 26031.
Failed to schedule transaction for changes to IIS.  (-2147418113

MSI (s) (34:48) [16:27:41:994]: Note: 1: 2265 2:  3: -2147287035
MSI (s) (34:48) [16:27:41:994]: Machine policy value 'DisableRollback' is 0
MSI (s) (34:48) [16:27:41:994]: Note: 1: 1402 2:
3: 2
MSI (s) (34:48) [16:27:41:994]: Note: 1: 1402 2:
3: 2
MSI (s) (34:48) [16:27:41:994]: No System Restore sequence number for
this installation.
MSI (s) (34:48) [16:27:41:994]: Unlocking Server
MSI (s) (34:48) [16:27:42:010]: Note: 1: 1708
MSI (s) (34:48) [16:27:42:010]: Product: MyProduct -- Installation failed.

MSI (s) (34:48) [16:27:42:010]: Windows Installer installed the
product. Product Name: MyProduct. Product Version: Product
Language: 1033. Manufacturer: Me. Installation success or error
status: 1603.

When I log into the server myself and run the save powershell script the
installation installs without issue, the TFSservice user that is installing
the application per the TFS release agent have the same privileges.  Is
there something in the IISConfig steps that requires some special
permission or action that only a logged in user can grant or that is
prevented when run from a service?

I have scoured this and other forums looking for any indication of how to
fix it, but have yet to turn up anything related to this specific error
code/text. I have exhausted all options I could think of over the last few
days. Any help would be appreciated.

Andrew Moser
malquijelkah at gmail.com

More information about the wix-users mailing list