IIS Server Application Error Automatic Repair Batch Processing

Source: Internet
Author: User

 

[Code] @ echo off

Echo *

Echo *

Echo *************************************** *************

Echo **

Echo * IIS Server Application Error Automatic Repair Batch Processing *

Echo * http://www.bkjia.com *

Echo **

Echo *************************************** *************

Echo *

Echo *

Set/p isok0 = start IIS repair? (Y/n)

If % isok0 % = y goto begin

Goto forend

 

: Begin

Set userIWAM = IWAM _ % COMPUTERNAME %

Set userIUSR = IUSR _ % COMPUTERNAME %

 

: CheckIWAM

Net user % userIWAM %

If % errorlevel % = 0 goto checkIUSR

Goto netuserIWAM

 

: CheckIUSR

Net user % userIUSR %

If % errorlevel % = 0 goto edituser

Goto netuserIUSR

 

: NetuserIWAM

Net user

Set/p tiwam = enter the correct "Start IIS process account" Name (that is, the account name starting with IWAM )?

Set userIWAM = % ans %

Goto checkIWAM

 

: NetuserIUSR

Net user

Set/p tiusr = enter the correct "Internet Guest Account" Name (that is, the account name starting with IUSR )?

Set userIUSR = % tiusr %

Goto checkIUSR

 

: Edituser

Echo resets the "Start IIS process account" password to 123

Net user % userIWAM % 123

Echo resets the "Internet Guest Account" password to 123

Net user % userIUSR % 123

Echo password Synchronization

Cscript.exe % HOMEDRIVE % \ Inetpub \ Adminscripts \ adsutil. vbs set w3svc/wamuserpass 123

Cscript.exe % HOMEDRIVE % \ Inetpub \ Adminscripts \ adsutil. vbs set w3svc/anonymoususerpass 123

Echo *

Echo *

Set/p isok1 = Please test if IIS is normal? (Y/n)

If % isok1 % = y goto forend

 

Cscript.exe % HOMEDRIVE % \ Inetpub \ Adminscripts \ synciwam. vbs-v

Iisreset

Echo *

Echo *

Set/p isok2 = Please test if IIS is normal? (Y/n)

If % isok2 % = y goto forend

 

Echo clears information about the MSDTC Service Registry.

Reg delete HKLM \ SYSTEM \ CurrentControlSet \ Services \ MSDTC/f

Reg delete HKLM \ SOFTWARE \ Microsoft \ MSDTC/f

Reg delete HKCR \ CID/f

Echo stops and reinstalls the MSDTC Service

Net stop msdtc

Msdtc-uninstall

Msdtc-install

Echo resets the "Start IIS process account" and "Internet Guest Account" passwords

Net user % userIWAM % 123

Net user % userIUSR % 123

Echo: Synchronize the password of IWAM_MYSERVER in IIS metabase

% HOMEDRIVE % \ Inetpub \ Adminscripts \ adsutil. vbs set w3svc/wamuserpass "123"

Echo: The IWAM_MYSERVER password used to synchronize COM + applications

Cscript.exe % HOMEDRIVE % \ Inetpub \ Adminscripts \ synciwam. vbs-v

Echo *

Echo *

Set/p isok3 = Please test if IIS is normal? (Y/n)

If % isok3 % = y goto forend

 

Echo re-register related components

Rundll32 % windir % \ system32 \ inetsrv \ wamreg. dll, CreateIISPackage

Regsvr32 % windir % \ system32 \ inetsrv \ asptxn. dll/s

Echo *

Echo *

Set/p isok4 = Please test if IIS is normal? (Y/n)

If % isok4 % = y goto forend

 

Echo *

Echo *

Echo: If IIS is not normal, I can't solve it. Please try again!

 

: Forend

Echo *

Echo *

@ Echo: the batch processing is complete. Please press any key to exit?

@ Echo off

Pause [/code]

 

 

IIS Server Application Error Automatic Repair Batch Processing

 

Http://www.unhonker.com /? P = 414

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.