@ Echo offecho * echo ********************************* * ****************** echo ** IIS server application error Automatic Repair batch processing ** echo ** Author: hayden * echo * blog: www.mysuc.com * echo ** echo ********************************** * ***************** echo * Set/P isok0 = start IIS repair? (Y/n) If % isok0 % = y goto begingoto forend: beginset useriwam = IWAM _ % computername % set useriusr = IUSR _ % computername %: checkiwamnet USER % useriwam % if % errorlevel % = 0 goto checkiusrgoto netuseriwam: checkiusrnet USER % useriusr % if % errorlevel % = 0 goto editusergoto netuseriusr: netuseriwamnet userset/P tiwam = enter the correct "Start IIS process account" Name (that is, the account name starting with IWAM )? Set useriwam = % ans % goto checkiwam: netuseriusrnet userset/P tiusr = enter the correct "Internet Guest Account" Name (that is, the account name starting with IUSR )? Set useriusr = % tiusr % goto checkiusr: edituserecho RESET "Start IIS process account" password 123net USER % useriwam % 123 echo RESET "Internet Guest Account" password 123net USER % useriusr % 123 echo password synchronization cscript.exe % homedrive % \ Inetpub \ adminscripts \ adsutil. vbs set w3svc/wamuserpass 123cscript.exe % homedrive % \ Inetpub \ adminscripts \ adsutil. vbs set w3svc/anonymoususerpass 123 echo * Set/P isok1 = Are IIS normal? (Y/n) If % isok1 % = y goto forendcscript.exe % homedrive % \ Inetpub \ adminscripts \ synciwam. vbs-viisresetecho * echo * Set/P isok2 = Please test whether IIS is normal? (Y/N) if % isok2 % = y goto forendecho clear MSDTC Service Registry Information Reg Delete HKLM \ System \ CurrentControlSet \ Services \ MSDTC/freg Delete HKLM \ Software \ Microsoft \ MSDTC/freg Delete hkcr \ CID/fecho stop and reinstall MSDTC service net stop msdtcmsdtc-uninstallmsdtc-installecho RESET "Start IIS process account" and "Internet Guest Account" password net user % useriwam % 123net USER % useriusr % 123 ECHO: synced IIS metabase iwam_myserver password % homedrive % \ Inetpub \ adminscripts \ adsutil. vbs set w3svc/wamuserpass "123" Echo synchronize COM + applicationsProgram The iwam_myserverpassword cscript.exe % homedrive % \ Inetpub \ adminscripts \ synciwam. vbs-vecho * echo * Set/P isok3 = is IIS normal? (Y/n) If % isok3 % = y goto forendecho re-register related components rundll32 % WINDIR % \ system32 \ inetsrv \ wamreg. DLL, createiispackageregsvr32 % WINDIR % \ system32 \ inetsrv \ asptxn. dll/secho * echo * Set/P isok4 = Please test if IIS is normal? (Y/n) If % isok4 % = y goto forendecho * echo If IIS is still abnormal, I can't solve it. Please do it again! : Forendecho * echo * @ ECHO: the batch processing is completed. Press any key to exit? @ Echo offpause