[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