Start and stop IIS? - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

kettch
Posts: 28
Joined: Wed Dec 03, 2008 9:34 pm

Start and stop IIS?

I have a DLL that has to be installed and registered during installation, but I need IIS stopped before the DLL can be installed then started up again at the end of the process. What is the best way to go about stopping and starting IIS with AI 7.1.3? I'm assuming a custom action of some sort?
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Start and stop IIS?

Hello,

IIS runs as a service, therefore it should be treated as one. Since you need to do two service operations at different install times, your best option is to use the sc command line utility. Set this utility as a "Launch File or Open URL" custom action:
Source Path: <AI_CUSTACTS>viewer.exe
Source Type: Executable
Command Line: sc Stop <YourServiceName>

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
kettch
Posts: 28
Joined: Wed Dec 03, 2008 9:34 pm

Re: Start and stop IIS?

Thanks Gabriel, that appears to be working! I knew it had to be something simple.

Return to “Common Problems”