I've found, as another post has pointed out, that you CAN use the failure
action "runCommand". This works fine. However, using either
"restartComputer" or "restartService" gives the permission error. 

Using processmon,
http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx, I can see the
Registry keys being accessed and written to at the time the MSI fails.
Interestingly, when it fails, it doesn't appear that the MSI is writing the
service failure values like it should. 

I'm running this as an Administrator and other values are being written to
that key (service name, description, etc.). So, I don't think there's
something wrong with my permissions or the way the MSI package is written. I
think there might be something genuinely wrong with the way MSI 5.0 handles
writing failure recovery settings for Windows services. 

Here are the Registry actions as captured by processmon:

This worked (when I set the failure action to "runCommand" -- it's supposed
to run a script at C:\script.cmd.

--------------------------------------
RegOpenKey      HKLM\System\CurrentControlSet\services\testsvc                  
                                SUCCESS 
Desired Access: Read
RegQueryValue   HKLM\System\CurrentControlSet\services\testsvc\FailureActions   
                
NAME NOT FOUND  Length: 268
RegQueryValue   HKLM\System\CurrentControlSet\services\testsvc\RebootMessage    
                
NAME NOT FOUND  Length: 268
RegQueryValue   HKLM\System\CurrentControlSet\services\testsvc\FailureCommand   
                
NAME NOT FOUND  Length: 268
RegCloseKey     HKLM\System\CurrentControlSet\services\testsvc                  
                                SUCCESS 
RegOpenKey      HKLM\System\CurrentControlSet\services\testsvc                  
                                SUCCESS 
Desired Access: Read/Write
RegQueryValue   HKLM\System\CurrentControlSet\services\testsvc\ImagePath        
                        
SUCCESS         Type: REG_EXPAND_SZ, Length: 122, Data: "C:\Program
Files\MySoftware\WindowsService1.exe"
RegQueryValue   HKLM\System\CurrentControlSet\services\testsvc\RebootMessage    
                
NAME NOT FOUND  Length: 268
RegDeleteValue  HKLM\System\CurrentControlSet\services\testsvc\RebootMessage    
                
NAME NOT FOUND  
RegQueryValue   HKLM\System\CurrentControlSet\services\testsvc\FailureCommand   
                
NAME NOT FOUND  Length: 268
RegSetValue     HKLM\System\CurrentControlSet\services\testsvc\FailureCommand   
                
SUCCESS         Type: REG_SZ, Length: 22, Data: script.cmd
RegSetValue     HKLM\System\CurrentControlSet\services\testsvc\FailureActions   
                
SUCCESS         Type: REG_BINARY, Length: 28, Data: 3C 00 00 00 01 00 00 00 01 
00
00 00 01 00 00 00
RegFlushKey     HKLM\System\CurrentControlSet\services\testsvc  SUCCESS 
RegCloseKey     HKLM\System\CurrentControlSet\services\testsvc  SUCCESS 
------------------------------------


However, this, where I tried to restart the service at failure, did not
work:

-------------------------------------
RegOpenKey      HKLM\System\CurrentControlSet\services\testsvc                  
                                SUCCESS 
Desired Access: Read
RegQueryValue   HKLM\System\CurrentControlSet\services\testsvc\FailureActions   
                
NAME NOT FOUND  Length: 268
RegQueryValue   HKLM\System\CurrentControlSet\services\testsvc\RebootMessage    
                
NAME NOT FOUND  Length: 268
RegQueryValue   HKLM\System\CurrentControlSet\services\testsvc\FailureCommand   
                
NAME NOT FOUND  Length: 268
RegCloseKey     HKLM\System\CurrentControlSet\services\testsvc                  
                                SUCCESS 
RegOpenKey      HKLM\System\CurrentControlSet\services\testsvc                  
                                SUCCESS 
Desired Access: Read
RegQueryValue   HKLM\System\CurrentControlSet\services\testsvc\FailureActions   
                
NAME NOT FOUND  Length: 268
RegQueryValue   HKLM\System\CurrentControlSet\services\testsvc\RebootMessage    
                
NAME NOT FOUND  Length: 268
RegQueryValue   HKLM\System\CurrentControlSet\services\testsvc\FailureCommand   
                
NAME NOT FOUND  Length: 268
RegCloseKey     HKLM\System\CurrentControlSet\services\testsvc                  
                                SUCCESS 
RegOpenKey      HKLM\System\CurrentControlSet\services\testsvc                  
                                SUCCESS 
Desired Access: Read/Write
RegFlushKey     HKLM\System\CurrentControlSet\services\testsvc                  
                                SUCCESS 
RegCloseKey     HKLM\System\CurrentControlSet\services\testsvc                  
                                SUCCESS 
------------------------------------------------------

Nick Ramirez
-- 
View this message in context: 
http://n2.nabble.com/MSI-5-0-ServiceConfigFailureActions-fails-during-InstallExecuteSequence-tp4452709p4469530.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to