Friday, October 29, 2010

Find all possible parameters for an MSI package installation using msiexec

While working on a library of powershell scripts to do unattended installations of BizTalk applications (and all adjacent files and packages) I needed to find out how to specify the settings for an MSI package in order to do a complete unattended install of it using msiexec.exe.

The MSI I was working with was a setup package for a WCF service. Since this installs to the IIS, both website, virtual directory as well as application pool is needed to be specified during the installation. The question is, what are the correct parameter switches for setting these?

Simple enough, these can be found by doing an install of the MSI and logging a verbose output to file. First, run msiexec with logging enabled:

msiexec /I package.msi /L*V installationlog.txt

Then look in the logfile for the text PROPERTY CHANGE. In the following example, the virtual directory is set using the property TARGETVDIR which then also can be used as a parameter to the msiexec command to set the property from outside the GUI:

Action start 15:41:42: WEBCA_TARGETVDIR.
MSI (c) (F4:8C) [15:41:42:943]: Note: 1: 2235 2: 3: ExtendedType 4: SELECT `Action`,`Type`,`Source`,`Target`, NULL, `ExtendedType` FROM `CustomAction` WHERE `Action` = 'WEBCA_TARGETVDIR'
MSI (c) (F4:8C) [15:41:42:943]: PROPERTY CHANGE: Adding TARGETVDIR property. Its value is 'MyWcfServiceLibrary'.
Action ended 15:41:42: WEBCA_TARGETVDIR. Return value 1.
MSI (c) (F4:8C) [15:41:42:943]: Doing action: WEBCA_SetTARGETSITE
Action 15:41:42: WEBCA_SetTARGETSITE.
Action start 15:41:42: WEBCA_SetTARGETSITE.

Note that the custom parameters are not to be set as normal switches with a leading slash /. In my case, the command will look like this:

msiexec /I package.msi /qb TARGETSITE="/LM/W3SVC/1" TARGET VDIR="MyWCFLibrary" TARGETAPPPOOL="BtsAppPoolC"

This will do a complete unattended install of the WCF service to IIS with basic UI and set the needed properties to my preferred values instead of the defaults.

Monday, October 25, 2010

Starting instance of host on server failed. / Could not create SSOSQL

Every now and then the BizTalk hosts won't start with the following message in the BizTalk Administration console:

Starting instance of host on server failed.
For help, click: http://go.microsoft.com/fwlink/?LinkId=47400&ProdName=Microsoft+BizTalk+Server+2009&ProdVer=3.8.368.0&EvtSrc=Microsoft.BizTalk.Administration.SnapIn.Properties.Errors&EvtID=HostInstance_UnmapServerHostInstanceFailed

ADDITIONAL INFORMATION:
Failed to start the BizTalk Host instance. Check the event log on the server "" for more details.
Internal error: "The dependency service or group failed to start." (WinMgmt)

The dependency that failed can usually be found by looking at the error message in the event log. Most likely you will find that the Enterprise Single Sign-On Service is unable to start with the following two messages:


Log Name: Application
Source: ENTSSO
Date: 2010-10-26 09:47:25
Event ID: 11047
Task Category: Enterprise Single Sign-On
Level: Error
Keywords: Classic
User: N/A
Computer:
Description:
Could not create SSOSQL. To fix the problem, reinstall SSO or try 'regasm SSOSQL.dll' from a Visual Studio command prompt.
Error Code: 0x80131700

Log Name: Application
Source: ENTSSO
Date: 2010-10-26 09:47:25
Event ID: 10503
Task Category: Enterprise Single Sign-On
Level: Error
Keywords: Classic
User: N/A
Computer:
Description:
The SSO service failed to start.
Error Code: 0x80131700

This can as the message describes most likely be fixed by registering the SSOSQL binary. What the message doesn't mention is that the version of regasm.exe that you have to run is different if you run 32 or 64 bit Windows.

For 32 bit OS:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe "C:\Program Files\Common Files\Enterprise Single Sign-On\SSOSQL.dll"

For 64 bit OS:
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\RegAsm.exe "C:\Program Files\Common Files\Enterprise Single Sign-On\SSOSQL.dll"

After registering the binary, the Enterprise SSO service can be started and subsequently also the BizTalk host instances.

Thursday, October 21, 2010

Recorded sessions from Applied Architecture Patterns now online

Today the recorded sessions from the BizTalk 2010 Release Party / Applied Architecture Patterns on the Microsoft Platform in Stockholm earlier this fall got released onto Channel9. They can be found at http://channel9.msdn.com/Tags/biztalk+user+group+sweden.

While they are all interesting, the one I'll check out first will probably be Pattern #4 – Cross Organization Supply Chain with a presentation on AppFabric caching which I feel can be an interesting implementation in many cases.