小洪維尼 发表于 2015-8-14 08:03:29

[Reference]Wix Restart IIS code snippet

  
  In reply to my first post on WiX, Josh asked if I knew how to restart IIS using WiX. As a matter of fact I do and here is the code.
  I had to create a new post as my previous post has reached the character limit imposed by Blogger.
  
  <!-- Restart IIS -->
  <ComponentId="WebserviceRestart"Guid="{19B3144E-A9DE-47e0-A2DB-C16A7E3F4F14}" KeyPath="yes">
     <ServiceControlId="StopWeb1"Name="W3SVC"Stop="install">
     </ServiceControl>
     <ServiceControlId="StartWeb1"Name="W3SVC"Start="install">
     </ServiceControl>
   </Component>
  
  <FeatureId="DefaultFeature"Level="1"ConfigurableDirectory="TARGETDIR">
     <ComponentRefId="WebserviceRestart" />
  </Feature>

Posted by Jeff Wharton at 8:39 AM
页: [1]
查看完整版本: [Reference]Wix Restart IIS code snippet