Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

.bat file command to reboot IIS

Posted on 2004-09-04
3
Medium Priority
?
1,624 Views
Last Modified: 2012-06-27
Hi Experts,

Is it possible to reboot IIS, and, then, as soon as it has rebooted, do something like register a dll, all in a single bat file that I can schedule to run unattended?

Thanks.
0
Comment
Question by:metalaureate
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 36

Accepted Solution

by:
Zyloch earned 2000 total points
ID: 11982791
Hi

Try this bat file. Code by Pete Freitag from http://www.cfdev.com/code_samples/code.cfm/CodeID/71/ColdFusion/Bat_file_to_Restart_IIS_Web__FTP__SMTP_Services:

@echo off

REM - File: iisrestart.bat
REM - Description: Restart's IIS (Web, FTP, SMTP)
REM - Author: Pete Freitag CFDEV.COM

REM - ADD REM comments if you don't want to restart any
REM - of Services

echo Restarting IIS...
echo ======================================================

net stop "World Wide Web Publishing Service"
net start "World Wide Web Publishing Service"

net stop "FTP Publishing Service"
net start "FTP Publishing Service"

net stop "Simple Mail Transport Protocol (SMTP)"
net start "Simple Mail Transport Protocol (SMTP)"

echo ======================================================
echo IIS Restarted

echo on



Now, put your own code, like registering dlls, between echo IIS Restarted and echo on

Regards,
Zyloch
0
 
LVL 4

Expert Comment

by:Kaarthick
ID: 11990844
A single coommand is enough to restart the IIS.

IISRESET

Open a command prompt and type the above command(IISRESET)

regsvr32 "path\filename.DLL"

The above command can be used to register and unregister DLL's.
0
 

Author Comment

by:metalaureate
ID: 12007872
That is indeed better! Thank you.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here are the symptoms: You start receiving calls from users that one of your legacy web apps isn't coming up, so you log into your IIS 5 server to check it out.  When you pull up the services, you notice that the WWW Publishing service isn't runn…
What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question