IIS server application error solution-Automatic Repair Batch Processing

Source: Internet
Author: User
@ Echo off
Echo *
Echo *
Echo *************************************** *************
Echo **
Echo * IIS server application error Automatic Repair Batch Processing *
Echo * Author: Hayden *
Echo * blog: www.mysuc.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

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.