Microsoft KB Archive/325889

= How to remove and reinstall IIS 5.0, 5.1 and 6.0 =

Article ID: 325889

Article Last Modified on 12/3/2007

-

APPLIES TO


 * Microsoft Internet Information Services 5.0
 * Microsoft Internet Information Services 5.1
 * Microsoft Internet Information Services 6.0

-



This article was previously published under Q325889



IN THIS TASK
SUMMARY Back up the IIS configuration Remove or reinstall IIS Restore the IIS configuration
 * Restore the IIS configuration after an IIS reinstallation
 * Restore the IIS configuration without an IIS reinstallation

REFERENCES



SUMMARY
This step-by-step article describes how to remove and reinstall Internet Information Services (IIS) versions 5.0, 5.1, and 6.0.

back to the top

Back up the IIS configuration
If you already have IIS 5.0 (which is included with Microsoft Windows 2000), IIS 5.1 (which is included with Microsoft Windows XP Professional), or IIS 6.0 (which is included with Microsoft Windows Server 2003) installed and configured, you may want to back up that configuration before you remove and reinstall IIS so that you do not have to rebuild all your Web sites from scratch if you want to restore the configuration.

To back up your IIS configuration, follow these steps:

Note This backup method restores only your IIS settings, not your content files. This backup method does not work if you reinstall your operating system. Backup files cannot be used to restore an IIS configuration on other computers that are running Windows 2000.
 * 1) Click Start, point to Programs, click Administrative Tools, and then click Internet Services Manager.
 * 2) Expand  .
 * 3) For IIS 5.0:

Click Action, and then click Backup/Restore Configuration.

For IIS 5.1 and IIS 6.0:

Click Action, click All Tasks, and then click Backup/Restore Configuration.
 * 1) Click Create backup, name your backup file, and then click OK.

Note If you are using Windows XP or Windows Server 2003, you can also click to select Encrypt backup with Password, and then provide and confirm a password.

Note The default location of the backup is the %SystemRoot%\system32\inetsrv\MetaBack folder. By default, C:\Winnt is the %SystemRoot% folder in Windows 2000 and C:\Windows is the %SystemRoot% folder in Windows XP Professional. If you want to save your backup file to another location, you can copy the file from this default location to another location. Keep a copy in the default location to allow for an easy restoration.
 * 1) Click Close.
 * 2) Use your regular backup program software to back up your content files for your Web sites.

back to the top

Remove IIS 5.0
To remove IIS 5.0, IIS follow these steps:  Locate the Iis5.log file. Rename it to IIS5_old.log. Click Start, click Run, type cmd, and then click OK. At the command prompt, type net stop iisadmin /y . Stop all services that depend on IIS services. To determine what services depend on IIS services, follow these steps:

Note This IIS services are the IIS Admin Service, the World Wide Publishing Service, the Simple Mail Transport Server, the FTP Publishing Service, and the NNTP Publishing Service.  Click Start, click Run, type Services.msc, and then click OK. Right-click the service that you want, and then click Properties. On the Dependencies tab, note the services listed in the The following system components depend on this service window.</li></ol> </li> In Task Manager, verify that Inetinfo.exe is not running. Also confirm that no processes that depend on IIS are running.</li> Click Start, click Run, type Appwiz.cpl, and then click OK.</li> In Control Panel, double-click Add/Remove Programs.</li> In the Add/Remove Programs window, click Add/Remove Windows Components.</li> In the Components box of the Windows Components Wizard, click to clear the Internet Information Services (IIS) check box.</li> In the Windows Components Wizard, click 'Next'.</li> When the Windows Components Wizard completes the installation, click Finish.</li> Restart the computer.</li> Click Start, click Run, type Lusrmgr.msc, and then click OK.</li> In the Local Users and Groups windows, verify that the IWAM_ and IUSR_ account have been deleted.

Note In the account names,  is the name of the computer.</li> Verify that the Inetsrv folder has been deleted. By default, the Inetsrv folder is located in the %Windir%\System32 folder.

Note You may be unable to delete the Inetsrv folder or its contents because of Windows File Protection.</li></ol>

back to the top

Remove IIS 5.1 or IIS 6.0
To remove IIS 5.1 or IIS 6.0, follow these steps: <ol> Locate the Iis5.log file. Rename it to IIS5_old.log.</li> Click Start, click Run, type cmd, and then click OK.</li> At the command prompt, type net stop iisadmin /y .</li> Stop all services that depend on IIS services. To determine what services depend on IIS services, follow these steps:

Note This IIS services are the IIS Admin Service, the World Wide Publishing Service, the Simple Mail Transport Server, the FTP Publishing Service, and the NNTP Publishing Service. <ol style="list-style-type: lower-alpha;"> <li>Click Start, click Run, type Services.msc, and then click OK.</li> <li>Right-click the service that you want, and then click Properties.</li> <li>On the Dependencies tab, note the services listed in the The following system components depend on this service window.</li></ol> </li> <li>In Task Manager, verify that Inetinfo.exe is not running. Also confirm that no processes that depend on IIS are running.</li> <li>Click Start, click Run, type Appwiz.cpl, and then click OK.</li> <li>In Control Panel, double-click Add/Remove Programs.</li> <li>In the Add/Remove Programs window, click Add/Remove Windows Components.</li> <li>In the Components box of the Windows Components Wizard, double-click Application Server.</li> <li>Click to clear the Internet Information Services (IIS) check box, and then click OK.</li> <li>In the Windows Components Wizard, click Next.</li> <li>When the Windows Components Wizard completes the installation, click Finish.</li> <li>Restart the computer.</li> <li>Click Start, click Run, type Lusrmgr.msc, and then click OK.</li> <li>In the Local Users and Groups windows, verify that the IWAM_ and IUSR_ account have been deleted.

Note In the account names,  is the name of the computer.</li> <li>Verify that the Inetsrv folder has been deleted. By default, the Inetsrv folder is located in the %Windir%\System32 folder.

Note You may be unable to delete the Inetsrv folder or its contents because of Windows File Protection.</li></ol>

back to the top

Install IIS
To install IIS, follow these steps:
 * 1) Click Start, click Run, type Appwiz.cpl, and then click OK.
 * 2) In the Add/Remove Programs window, click Add/Remove Windows Components.
 * 3) In the Components box of the Windows Components Wizard, click to select the Internet Information Services (IIS) check box.
 * 4) In the Windows Components Wizard, click Next.
 * 5) When the Windows Components Wizard completes the installation, click Finish.

back to the top

Restore the IIS configuration
The steps to restore a configuration differ depending on whether you removed and reinstalled IIS.

Note If you want to restore your IIS configuration and only an older copy or no copy of the metabase file exists, you must follow a different procedure. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

234429 How to manually restore the metabase when no proper backup exists or when the MMC does not start

back to the top

Restore the IIS configuration after an IIS reinstallation
To restore your IIS configuration after you have removed and reinstalled IIS, follow these steps:
 * 1) Use your regular backup program software to restore your content files for your Web sites.
 * 2) Click Start, point to Programs, click Administrative Tools, and then click Internet Services Manager.
 * 3) Expand  .
 * 4) For IIS 5.0:

Click Action, and then click Backup/Restore Configuration.

For IIS 5.1:

Click Action, click All Tasks, and then click Backup/Restore Configuration.
 * 1) In the Configuration Backup Name dialog box, select the backup file that you created, and then click Restore.

Note If you are using Windows XP and you selected 'Encrypt backup with Password', provide and confirm the password.

You may receive an error message that states that the restoration has failed, but part of your backed-up configuration is restored. To resolve this problem, follow these steps:

Note Leave the Configuration Backup Dialog box open. <ol> <li>At a command prompt, type the following (where  is the letter of the drive on which IIS is installed), and then press ENTER:

cscript.exe :\InetPub\AdminScripts\Adsutil.vbs enum w3svc

Note To use the Adsutil.vbs utility, you must have Windows Script Host installed.</li> <li>In the listed settings, locate the WamUserName value.</li> <li>In Control Panel, double-click Administrative Tools, and then double-click Computer Management. Click Local Users and Groups, and then click Users.</li> <li>Double-click the IWAM_computername user account. Type a password for this account, and then click OK.</li> <li>At a command prompt, type the following (where  is the letter of the drive on which IIS is installed), and then press ENTER:

cscript.exe :\InetPub\AdminScripts\Synciwam.vbs

</li> <li>In the Configuration Backup Name dialog box, click to select the backup file that you created, and then click Restore. This fully restores your configuration.

Note If you change the identity of your out-of-process applications, those applications revert to the previous IWAM user name.</li></ol>

back to the top

Restore the IIS configuration without an IIS reinstallation
To restore your IIS configuration if you have not removed and reinstalled IIS, follow these steps:
 * 1) Click Start, point to Programs, click Administrative Tools, and then click Internet Services Manager.
 * 2) Expand  .
 * 3) For IIS 5.0:

Click Action, and then click Backup/Restore Configuration.

For IIS 5.1:

Click Action, select All Tasks, and then click Backup/Restore Configuration.
 * 1) In the Configuration Backup Name dialog box, select the backup file that you created, and then click Restore.

Note If you are using Windows XP and you selected Encrypt backup with Password, provide and confirm the password.
 * 1) When you are prompted to restore your configuration settings, click Yes.

back to the top

<div class="references_section">