I have been installing/uninstalling services through Custom Actions earlier.
I attempted to use ServiceInstall to install the service. The service
installs, but I cannot start it. It appears to be a permissions problem. I
have read a bunch of posts, and have attempted some of the suggestions, but
could not get this to work. I have tried to only install the service through
the MSI and start the service manually, I get the error 1053 - "Service did
not start in a timely manner". I think I was getting the 1920 error without
the Account and Password attributes on ServiceInstall. If I attempt to start
the service, then uninstall fails to remove it, the service goes into a
disabled state and I have to reboot to clear the service registry. I have
tried deleting registry keys related to the service, but it did not work.
However if I uninstall without attempting to start the service, then the
service gets correctly removed through the MSI. I could not get anything
useful out of the Event Viewer or MSI logs. This all ofcourse, works fine if
I attempt to install/start the service through the command line, which is
what the Custom Action was invoking.

Here is the code snippet, its pretty similar to what others have posted.

   <Component Id="atlantis" Guid="65822460-7229-4935-94e7-449baf1ca86c"
DiskId="1">
     <File Id="file0" Name="file0" LongName="AtlantisAgent.exe"
src="d:\test\atlantis\AtlantisAgent.exe" KeyPath="yes" />
     <ServiceInstall Id="atlantisagentwinservice"
Name="AtlantisAgentWinService" Arguments="-Install"
DisplayName="AtlantisAgentWinService" Description="Atlantis Agent Windows
Service" ErrorControl="normal" Start="auto" Type="ownProcess"
Account="[SERVICEACCOUNT]" Password="[SERVICEPASSWORD]"/>
     <ServiceControl Id="atlantisagentwinservice"
Name="AtlantisAgentWinService" Remove="uninstall" Wait="yes"/>
   </Component>

I am using Wix 2.0.4820.

Thanks,
-Sandip
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to