Windows Service Deployment problem

G

Guest

I get the following Log in EventLog on attempting to use a custom action to
write to a config file in the to be installed application after a call to the
base Install method.

The description for Event ID ( 11001 ) in Source ( MsiInstaller ) cannot be
found. The local computer may not have the necessary registry information or
message DLL files to display messages from a remote computer. You may be able
to use the /AUXSOURCE= flag to retrieve this description; see Help and
Support for details. The following information is part of the event: Product:
DOILoadWindowsService -- Error 1001. Exception occurred while initializing
the installation:
System.IO.FileNotFoundException: File or assembly name DOI, or one of its
dependencies, was not found.., (NULL), (NULL), (NULL).

Without this custom action, the install works OK, with it, it fails every
time. The custom action uses CustomActionData as follows:
/WATCHED=[WATCH] UPLOADED=[UPLOADED] ERRORS=[ERRORS] ERRORFILE=[ERRORFILE]
where the values are collected from a UserInterface TextBox object. Without
the custom action, the folders referred to above are created every time but I
want the user defined paths to be written to the config file so that they can
be accessed by the Windows service when it is started or running.

What is going on here? How can I sort this out?

cheers
 
P

Phil Wilson

This seems to happen because the service installer also uses
customactiondata that is passed into the installer code, and your
customactiondata gets mixed in with what the installer is looking for. If
you add another assembly with with your installer classs that should work.
If you search for FileNotFoundException in .....framework.setup and
....vsnet.setup you'd see more discussion of this issue.

I'll add as a rant that Windows Installer has built-in support for
installing Services, and if you were using any other tool they would have
IDE support for populating the ServiceControl and ServiceInstall tables in
the MSI file. .NET Services install just like Win32 Services, and installer
classes are not required. Look at Wix for another solution.
 
G

Guest

Phil

Can you explain this in a bit more detail please. If you create another
assembly with an installer how will this reference the CustomActionData in
the serviceInstaller. Do I need to add this to the Installer collection? I
have tried that and I still get the FileNotFoundException problem. I need to
pass that data or have it access the information from the Context Parameter
collection and I cant see how this would work without the same event not
firing problem that I am already getting.

I have ordered your book through Amazon but would still like to get on with
it in the meantime and its not intuitive.

cheers
--
PeterW


Phil Wilson said:
This seems to happen because the service installer also uses
customactiondata that is passed into the installer code, and your
customactiondata gets mixed in with what the installer is looking for. If
you add another assembly with with your installer classs that should work.
If you search for FileNotFoundException in .....framework.setup and
....vsnet.setup you'd see more discussion of this issue.

I'll add as a rant that Windows Installer has built-in support for
installing Services, and if you were using any other tool they would have
IDE support for populating the ServiceControl and ServiceInstall tables in
the MSI file. .NET Services install just like Win32 Services, and installer
classes are not required. Look at Wix for another solution.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

PeterW said:
I get the following Log in EventLog on attempting to use a custom action to
write to a config file in the to be installed application after a call to
the
base Install method.

The description for Event ID ( 11001 ) in Source ( MsiInstaller ) cannot
be
found. The local computer may not have the necessary registry information
or
message DLL files to display messages from a remote computer. You may be
able
to use the /AUXSOURCE= flag to retrieve this description; see Help and
Support for details. The following information is part of the event:
Product:
DOILoadWindowsService -- Error 1001. Exception occurred while initializing
the installation:
System.IO.FileNotFoundException: File or assembly name DOI, or one of its
dependencies, was not found.., (NULL), (NULL), (NULL).

Without this custom action, the install works OK, with it, it fails every
time. The custom action uses CustomActionData as follows:
/WATCHED=[WATCH] UPLOADED=[UPLOADED] ERRORS=[ERRORS] ERRORFILE=[ERRORFILE]
where the values are collected from a UserInterface TextBox object.
Without
the custom action, the folders referred to above are created every time
but I
want the user defined paths to be written to the config file so that they
can
be accessed by the Windows service when it is started or running.

What is going on here? How can I sort this out?

cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top