Custom action not working

C

Claire

Hi
I've created an installation package for my Service application. This is my
first attempt at an install package.
In the simplest install package, the files are being created in the target
directory ok. InstallUtil.exe is one of these files.
I've now tried to add a custom action (I've tried both Install and Commit
phases trying to get it to work) to run InstallUtil.exe, passing my service
executable name (without path info) as "Arguments". I've set
"InstallerClass" to false.
When install is run a command prompt window opens, to run installutil as I'd
expect, then closes again quickly and I get an error message from the
installer that there was an error during installation.
Following in an extract from my install log file which doesn't really make
any sense to me. What's wrong here please? I don't believe the problem is
anything to do with icons/dialogs.

MSI (s) (88:F8) [08:25:58:236]: Note: 1: 1722 2:
_FC60C24A_E67B_42C0_8C63_F55585CEA052 3: C:\Program Files\JF Ltd\MCAS
Monitor\InstallUtil.exe 4: /u jfmMCASMonitorService.exe
MSI (s) (88:F8) [08:25:58:236]: Note: 1: 2262 2: Error 3: -2147287038
MSI (c) (28:AC) [08:25:58:267]: Note: 1: 2262 2: Error 3: -2147287038
DEBUG: Error 2835: The control ErrorIcon was not found on dialog ErrorDialog
The installer has encountered an unexpected error installing this package.
This may indicate a problem with this package. The error code is 2835. The
arguments are: ErrorIcon, ErrorDialog,
Error 1722. There is a problem with this Windows Installer package. A
program run as part of the setup did not finish as expected. Contact your
support personnel or package vendor. Action
_FC60C24A_E67B_42C0_8C63_F55585CEA052, location: C:\Program Files\JF
Ltd\MCAS Monitor\InstallUtil.exe, command: /u jfmMCASMonitorService.exe
MSI (s) (88:F8) [08:25:59:686]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (88:F8) [08:25:59:686]: Product: JF MCAS Monitor -- Error 1722.
There is a problem with this Windows Installer package. A program run as
part of the setup did not finish as expected. Contact your support personnel
or package vendor. Action _FC60C24A_E67B_42C0_8C63_F55585CEA052, location:
C:\Program Files\JF Ltd\MCAS Monitor\InstallUtil.exe, command: /u
jfmMCASMonitorService.exe
 
M

mdb

Claire said:
When install is run a command prompt window opens, to run installutil
as I'd expect, then closes again quickly and I get an error message
from the installer that there was an error during installation.
Following in an extract from my install log file which doesn't really
make any sense to me. What's wrong here please? I don't believe the
problem is anything to do with icons/dialogs.

Hmmm... two guesses:

first guess is that you can't run installutil during an MSI install.

second guess (more of a suggestion, really) would be to make sure that the
program can successfully run. Try this... when the installer comes back
and says that there was an error in the installation, don't click the OK
button. Instead, open a command prompt, switch to your windows\system32
directory and then type the full path to the installutil.exe just as you
would expect that the MSI Installer would, including the command line
options and see if it does what you expect. Hopefully, it will give you
some kind of error information that will be more useful.

-mdb
 
C

Claire

Hmmm... two guesses:
first guess is that you can't run installutil during an MSI install.

second guess (more of a suggestion, really) would be to make sure that the
program can successfully run. Try this... when the installer comes
back
and says that there was an error in the installation, don't click the OK
button. Instead, open a command prompt, switch to your windows\system32
directory and then type the full path to the installutil.exe just as you
would expect that the MSI Installer would, including the command line
options and see if it does what you expect. Hopefully, it will give you
some kind of error information that will be more useful.

Interesting, where is The Current Directory when one attempts to run a file
included as part of the installation?
If I included installutil.exe into the same path as the installed
application and ran that as a custom action, would The Current Directory be
the application path or system32?
 

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