Hi
 
I am looking into WIX as a solution to better automate our installation 
(involving multiple systems). 
I have been playing for a couple of weeks but am essentially new to 
installation so have been 
learning about msi's, etc as well. (I have v 2.0.4221.0)
 
Anyway. Has anyone got an example of using the "ServiceInstall" custom action 
that works. I have managed 
to get some direct simple CA's to work (running external VB etc), but have not 
found a complete
explanation for the DLL calls made using this WIX CA. The linker is using 
"SchedSecureObjects" and 
"SchedServiceObjects", both found in wixca.dll. I tryed the following:
 
<Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi";>
 <Product Id="12345678-1234-1234-9234-123456789012" Name="Test Service Package" 
Language="1033" Version="1.0.0.0" Manufacturer="Microsoft Corporation">
  <Package Id="12345678-1234-1234-9234-123456789012" Description="My first 
Windows Installer package" Comments="This is my first attempt at creating a 
Windows Installer database" Manufacturer="Microsoft Corporation" 
InstallerVersion="200" Compressed="yes"/>
  <Media Id="1" Cabinet="product.cab" EmbedCab="yes"/>
  <Directory Id="TARGETDIR" Name="SourceDir">
   <Directory Id="ProgramFilesFolder" Name="PFiles">
    <Directory Id="MyDir" Name="TestProg" LongName="Test Service Program">
     <Component Id="MyComponent" Guid="12345679-1234-1234-9234-123456789012">
      <File Id="readme" Name="RulesEng.exe" LongName="RulesEngineServer.exe" 
DiskId="1" src="RulesEngineServer.exe"/>
      <ServiceInstall Id="12345678-1234-1234-9934-123456789012" 
Account="SYSTEM"  DisplayName="Rules Engine Server" EraseDescription="yes" 
ErrorControl="critical" Interactive="no" Name="RulesEngineServer" 
Start="demand" Type="ownProcess" Vital="yes">
       <Permission User="SYSTEM" ServiceChangeConfig="yes" 
ServiceEnumerateDependents="yes" ServiceInterrogate="yes" 
ServicePauseContinue="yes" ServiceQueryConfig="yes" ServiceQueryStatus="yes" 
ServiceStart="yes" ServiceStop="yes" ServiceUserDefinedControl="yes">
      </Permission>
       <ServiceConfig FirstFailureActionType="restart" ResetPeriodInDays="0" 
RestartServiceDelayInSeconds="60" SecondFailureActionType="restart" 
ThirdFailureActionType="restart">
      </ServiceConfig>
       <ServiceDependency Id="RPCSS">
      </ServiceDependency>
      </ServiceInstall>
     </Component>
    </Directory>
   </Directory>
  </Directory>
  <Feature Id="TestService" Title="Test Service" Level="1">
   <ComponentRef Id="MyComponent"/>
  </Feature>
  <InstallExecuteSequence>
   <Custom After="InstallFiles" Action="SchedServiceConfig"/>
   <Custom After="InstallFiles" Action="SchedSecureObjects"/>
  </InstallExecuteSequence>
  <Binary Id="WixCa" src="wixca.dll"/>
  <CustomAction Id="SchedServiceConfig" DllEntry="SchedServiceConfig" 
BinaryKey="WixCa" Execute="immediate" Return="check" />
  <CustomAction Id="SchedSecureObjects" DllEntry="SchedSecureObjects" 
BinaryKey="WixCa" Execute="immediate" Return="check" /> 
 </Product>
</Wix>

This links but fails when run. The msiexec verbose output implies that it gets 
as far as making a call.
 
MSI (s) (98:00) [12:29:05:217]: Doing action: SchedServiceConfig
MSI (s) (98:00) [12:29:05:217]: Note: 1: 2205 2:  3: ActionText 
Action start 12:29:05: SchedServiceConfig.
MSI (s) (98:BC) [12:29:05:247]: Invoking remote custom action. DLL: 
C:\WINDOWS\Installer\MSI54.tmp, Entrypoint: SchedServiceConfig
MSI (s) (98:F0) [12:29:05:257]: Generating random cookie.
MSI (s) (98:F0) [12:29:05:267]: Created Custom Action Server with PID 3244 
(0xCAC).
MSI (s) (98:90) [12:29:05:408]: Running as a service.
MSI (s) (98:D0) [12:29:05:418]: Hello, I'm your 32bit Impersonated custom 
action server.
MSI (s) (98!70) [12:29:05:438]: PROPERTY CHANGE: Adding ExecServiceConfig 
property. Its value is 
'RulesEngineServerEURrestartEURrestartEURrestartEUR0EUR60EUREUR'.
MSI (s) (98!70) [12:29:05:438]: Doing action: ExecServiceConfig
MSI (s) (98!70) [12:29:05:438]: Note: 1: 2205 2:  3: ActionText 
Action start 12:29:05: ExecServiceConfig.
Action ended 12:29:05: ExecServiceConfig. Return value 0.
SchedServiceConfig:  Error 0x8007065a: Failed MsiDoAction on deferred action
SchedServiceConfig:  Error 0x8007065a: failed to schedule ExecSecureObjects 
action
Action ended 12:29:05: SchedServiceConfig. Return value 3.

I dont know how this should be working, some of my xml attributes might be 
wrong.
RulesEngineServer.exe is a service and I have put wixca.dll local.
 
regards
Dave.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to