[WiX-users] How to keep Service settings after Patch?

2011-07-29 Thread Vadym Verba
Hey there.

I have some service declarations in my wix project like this:

Component Id=service_component_id Guid=*

   File Id=service.exe KeyPath=yes Source=$(var.Binaries)\service.exe

ServiceInstall Id=service_id Name=service_name DisplayName=!(loc.
service_displayname) Start=auto Description=!(loc.service_description)
ErrorControl=normal Type=ownProcess Vital=yes
xmlns=http://schemas.microsoft.com/wix/2006/wi/

/Component

After installation i changed service Start type setting from Automatic to
Manual that would only be used in failover.

Next I have a patch that updates these services, but after its application
the Start type back to Automatic. That becomes a big problem when you have
a lot of such services and it is vital to keep Start type. So what I want
to do here is to do not update settings (but still update files) for existing
services and reinstall missing.

 

What I have discovered so far is that there are DeleteServices and
InstallServices actions in InstallExecuteSequence, so that is probably the
reason of such behavior. I can't set conditions for them, because I want
missing services to be reinstalled. I also can't mark Component as
NeverOverwrite, because it has File subnode which I want to update.

Next thing I have noticed is that msi has ServiceInstall table where service
settings are stored. So as a very brutal workaround I can write CA to check
if services are exists, read their settings and modify msi ServiceInstall
table at runtime.

Looking for some more humane solution for this problem.

 

Best regards,

Vadym.

 

/pre
BR style=font-size:4px;
a href = http://www.sdl.com/sdl-vision;img 
src=http://www.sdl.com/images/email_new_logo.png; alt=www.sdl.com/sdl-vision 
border=0//a
BR
font face=arial  size=2a href =http://www.sdl.com/sdl-vision; 
style=color:005740; font-weight: boldwww.sdl.com/sdl-vision/a/font
BR
BR
font face=arial  size=1 color=#736F6E
bSDL PLC confidential, all rights reserved./b
If you are not the intended recipient of this mail SDL requests and requires 
that you delete it without acting upon or copying any of its contents, and we 
further request that you advise us.BR
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.BR
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.
/font
--
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to keep Service settings after Patch?

2011-07-29 Thread Bob Arnson
On 29-Jul-11 04:04, Vadym Verba wrote:
 Next I have a patch that updates these services, but after its application
 the Start type back to Automatic. That becomes a big problem when you have
 a lot of such services and it is vital to keep Start type. So what I want
 to do here is to do not update settings (but still update files) for existing
 services and reinstall missing.

That's not supported by MSI. Try 
http://www.joyofsetup.com/2007/07/01/semi-custom-actions/.

-- 
sig://boB
http://joyofsetup.com/


--
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users