S h o r t S t o r i e s

// Tales from software development

Could not start the service on Local Computer, Error 193: 0xc1

leave a comment »

During deployment testing of a new project that’s implemented as a Windows Service I got an error message that I’ve never seen before when I tried to start the service: 

Could not start the Vitality PASMDI Service service on Local Computer
Error 193: 0cx1

I knew the service worked as I’d been running it on my development PC. I’d also successfully started the service after installing an earlier version of the installer so why wouldn’t the service start after installing using the latest version of the installer ?

The last change that I’d made to the installer was to add an XML data file that the service loads when it starts. I reviewed the WiX source code and realised that I’d added the new file incorrectly. The WiX ServiceInstall element is associated with the first File element in a component or with the File element that specifies KeyPath=”yes”. I was using the ‘first File element in the component’ method but had added the new file as the first File element in the component and so had inadvertantly replaced the association of the ServiceInstall element and the Windows Service executable with an association to the XML data file.

I confirmed this by checking the service properties in the Services console. As expected, the ‘Path to executable’ value was the path for the XML data file and not the service excutable.

The problem was resolved by moving the File element for the new file so that the first File element in the component was the one for the service executable.

The point is, the inscrutable “Error 193: 0cx1” error message simply indicates that the file that the service definition references is not an executable.

Advertisements

Written by Sea Monkey

November 23, 2009 at 8:00 am

Posted in Deployment

Tagged with

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: