Record that IIS automatically fixes bat

Source: Internet
Author: User
@ 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

 

Related Article

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.