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    

posted on 2008-02-07 13:57  JerryZhao  阅读(910)  评论(1编辑  收藏  举报