Using the following snippet does the trick:
<InstallExecuteSequence>
<!-- Reset IIS during all maintenance-type calls -->
<Custom Action='ResetIIS' After='InstallInitialize'>NOT Installed OR
Installed OR REINSTALL</Custom>
</InstallExecuteSequence>
<!-- Needed to suppress the Console Window -->
<Binary Id="wixca" src="wixca.dll"/>
<Property Id="QtExecCmdLine" Value='"[System64Folder]iisreset"' />
<CustomAction Id='ResetIIS' Return='ignore' BinaryKey='wixca'
DllEntry="CAQuietExec" Execute="immediate" />
I wouldn't mind someone commenting on my CustomAction conditions (I am a
n00b when it comes to those conditions). I have logged all scenarios
(reinstall/install/uninstall) and IIS gets reset every time - of course all
the dependent services get started/stopped because of the call. I guess it
depends on different scenarios, too, but in my case I am creating a custom
AppPool which "locks" the installation folder until IIS is reset. So the
simple call above during Uninstall/Reinstall forces IIS to reset, there by
freeing up the "locked" folder. Needless to mention, because the folder is
locked, if someone runs the MSI to uninstall the product, the process fails,
and WIX complains that access to folder is denied.
It is very weird, and am not sure if other people have had similar
experiences. But as pointed above, resetting IIS this way, seems to be
working for me.
Thanks for the input! Again, I wouldn't mind someone else verifying my
Custom Action condition in the snippet above.
On Nov 29, 2007 4:33 PM, Dhaval Patel <[EMAIL PROTECTED]> wrote:
> I think that is a good idea - to invoke netstart/stop and not worry about
> the return code. I'll give it a shot and let everyone know how it works
> out...
>
> Thanks.
>
>
>
> On Nov 29, 2007 4:07 PM, Kelly Leahy < [EMAIL PROTECTED]> wrote:
>
> >
> > I dont' think windows even has such a feature, so I'd be surprised if
> > MSI does.
> >
> > I think that's the whole reason why iisreset is a program and they don't
> > just rely on people having to do net start / net stop commands.
> >
> > By the way, if you know the dependencies, you could just do net start
> > and not check the return value, couldn't you? Or does MSI also complain
> > when net start throws an error?
> >
> > Kelly
> >
> >
> >
> > *"Dhaval Patel" <[EMAIL PROTECTED]>*
> >
> > Sent by: [EMAIL PROTECTED]
> >
> > 11/29/2007 04:00 PM
> > To
> > "wix-users@lists.sourceforge.net" <wix-users@lists.sourceforge.net> cc
> > Subject
> > [WiX-users] Dependent Windows Services
> >
> >
> >
> >
> > I never figured out a built-in way (in WIX) to start/stop dependent
> > Windows services automagically. For example, the server has IIS installed
> > along with SMTP & POP3. When I stop IIS (via ServiceControl), the dependent
> > services also get stopped, but when I restart IIS (via ServiceControl), the
> > dependent services don't get started. I can include extra ServiceControl
> > elements for all the IIS dependent services, but the MSI will throw and
> > exception if one these dependent services hasn't been installed.
> >
> > In short, is there a way to achieve the above functionality magically
> > (meaning, when I start/stop a specific service, all the dependent services
> > would start/stop based on which service is installed)?
> >
> > Thanks.
> > -------------------------------------------------------------------------
> > SF.Net email is sponsored by: The Future of Linux Business White Paper
> > from Novell. From the desktop to the data center, Linux is going
> > mainstream. Let it simplify your IT future.
> > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4_______________________________________________
> >
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
> >
> >
> >
> > **************************************************************************************
> > This communication is intended solely for the addressee and is
> > confidential. If you are not the intended recipient, any disclosure,
> > copying, distribution or any action taken or omitted to be taken in
> > reliance on it, is prohibited and may be unlawful. Unless indicated
> > to the contrary: it does not constitute professional advice or
> > opinions upon which reliance may be made by the addressee or any
> > other party, and it should be considered to be a work in progress.
> > Unless stated otherwise, this communication does not form a prescribed
> > statement of actuarial opinion under American Academy of Actuaries
> > guidelines.
> >
> > **************************************************************************************
>
>
>
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users